我有一个WinForms应用程序。每个窗体和用户控件按如下方式设置其工具提示:
// in the control constructor
var toolTip = new ToolTip();
this.Disposed += (o, e) => toolTip.Dispose();
toolTip.SetToolTip(this.someButton, "...");
toolTip.SetToolTip(this.someCheckBox, "...");
...
但是,当我将鼠标悬停在控件上时,工具提示不会出现。这是使用工具提示的合适方式吗?是否
我试图将工具提示应用于工具条按钮,但它始终给我带来了以下错误:
Operator '==' cannot be applied to operands of type 'System.Windows.Forms.Control' and 'System.Windows.Forms.ToolStripButton'
知道怎么解决这个问题吗?
更新:
private void toolTip1_Popup(object sender, PopupEventArgs e)
{
if (e.AssociatedControl == tBtn1)
由于某些原因,silverlight中的工具提示正在反转显示的文本。
这是代码
// Create the colored rectangle
Rectangle rect = new Rectangle();
// Set the grid row and column
Grid.SetRow(rect, i);
Grid.SetColumn(rect, 0);
// Set the rectangle into the UI
在WPF中,我得到一个工具提示以显示立即,如下所示:
TextBlock tb = new TextBlock();
tb.Text = name;
ToolTip tt = new ToolTip();
tt.Content = "This is some info on " + name + ".";
tb.ToolTip = tt;
tt.Cursor = Cursors.Help;
ToolTipService.SetInitialShowDelay(tb, 0);
这使得用户体验更好的,因为如果用户想要查看页面上的五个项的工具提示,他不必等待长的第二项
我是Silverlight5,Visual Studio2012,C#,Blend的新手...
我正在使用此示例将工具提示添加到我的DataGrid中:
var style = new Style(typeof(System.Windows.Controls.Primitives.DataGridColumnHeader)); style.Setters.Add(new Setter(ToolTipService.ToolTipProperty, "Este es mi ToolTip"));
myDataGrid.ColumnHeaderStyle = style;
但是这
在我的Silverlight4应用程序中,我有一些很长的工具提示。默认情况下,这些工具提示显示为一行非常长的行。例如:
<TextBox Text="Test1"
ToolTipService.ToolTip="One tasdg asdg as da sdg asdg asdg asdg asd gas dg a sdg a sdg a sd a sd g asdasdgasdg sadgasdgasdg asdg asdg asd as a sd g a sdg asd g asd g as
我正在为GWT应用程序使用GwtBootstrap3,并希望拥有如下所示的内容
<b:Tooltip title="I am a Tooltip!">
<b:Button addStyleNames="{style.margin}" text="I have a Tooltip! (top)"/>
</b:Tooltip>
但是在JAVA中的编程方式如下所示
Tooltip tooltip = new Tooltip();
tooltip.setTitle = "I am a Tooltip
我试图创建自定义工具提示插件只是为了学习的目的。当我在诸如“工具提示”这样的自定义属性中获取工具提示文本时,每件事情都正常工作,但是在“标题”的情况下,我无法隐藏/禁用浏览器默认的标题工具提示。
HTML:
<p id="p1" title="tooltip 1">Go</a>">
This is a paragraph
</p>
<p id="p2" title="tooltip 2">
This is another paragraph
</