问题描述:
我用ToolTipController.ShowHint方法显示附近编辑框的工具提示。但是,该方法只有第一次生效。我怎样才能为同一个编辑框再次显示工具提示?
问题解答:
根据设计,工具提示控件只显示一次。 当显示提示编程时,你可以通过在ShowHint前调用HideHint方法实现解决此问题。参考代码如下:
[C#]
toolTipController1.HideHint();
toolTipController1.ShowHint("A tooltip", textBox1, DevExpress.Utils.ToolTipLocation.RightCenter);
1、如何设置显示的时间长短
设置this.toolTipController1.AutoPopDelay = 2000;
2、如何在屏幕上显示如上图所示的效果
ToolTipControllerShowEventArgs args = this.toolTipController1.CreateShowArgs();
this.toolTipController1.SetToolTip(this.sbtnYes, "请选择一条记录!");
this.toolTipController1.SetTitle(this.sbtnYes, "提示");
this.toolTipController1.SetToolTipIconType(this.sbtnYes, DevExpress.Utils.ToolTipIconType.Exclamation);
this.toolTipController1.ShowBeak = true;
this.toolTipController1.ShowShadow = true;
this.toolTipController1.Rounded = true;
this.toolTipController1.ShowHint("请选择一条记录!", "提示");
args.ToolTip = "请选择一条记录!";
args.Title = "提示";
3、如何设置边框的颜色
this.toolTipController1.Appearance.BorderColor = Color.Red;