ToolStrip.ShowItemToolTips ToolStrip.ShowItemToolTips ToolStrip.ShowItemToolTips ToolStrip.ShowItemToolTips Property

定義

取得或設定值,指出工具提示是否會顯示在 ToolStrip 項目上。Gets or sets a value indicating whether ToolTips are to be displayed on ToolStrip items.

public:
 property bool ShowItemToolTips { bool get(); void set(bool value); };
public bool ShowItemToolTips { get; set; }
member this.ShowItemToolTips : bool with get, set
Public Property ShowItemToolTips As Boolean

屬性值

如果會顯示工具提示則為 true;否則為 falsetrue if ToolTips are to be displayed; otherwise, false. 預設為 trueThe default is true.

範例

下列程式碼範例會關閉的自動ToolTip文字ToolStripButton ,並設定自訂ToolTip文字。The following code example turns off the automatic ToolTip text for a ToolStripButton and sets custom ToolTip text. 這個範例是AutoToolTip屬性中提供之較大範例的一部分。This example is part of a larger example available in the AutoToolTip property.

this.toolStripButton1.AutoToolTip = false;
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Text = "Button1";
this.toolStripButton1.ToolTipText = "ToolTip for Button1.";
Me.toolStripButton1.AutoToolTip = False
Me.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
Me.toolStripButton1.Name = "toolStripButton1"
Me.toolStripButton1.Text = "Button1"
Me.toolStripButton1.ToolTipText = "ToolTip for Button1."

備註

使用屬性來判斷是否要顯示的ToolStripItem工具提示。 ShowItemToolTipsUse the ShowItemToolTips property to determine whether ToolTips are displayed for the ToolStripItem.

適用於

另請參閱