[C#/DevExpress]toolTipController1的使用

问题描述:

我用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;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值