ToolTip.StripAmpersands Property

Definition

获取或设置一个值,该值确定如何处理 &。Gets or sets a value that determines how ampersand (&) characters are treated.

public:
 property bool StripAmpersands { bool get(); void set(bool value); };
[System.ComponentModel.Browsable(true)]
public bool StripAmpersands { get; set; }
member this.StripAmpersands : bool with get, set
Public Property StripAmpersands As Boolean

Property Value

Boolean

true 如果从工具提示文本中去除了 "&" 字符,则为;否则,falsetrue if ampersand characters are stripped from the ToolTip text; otherwise, false. 默认值为 false。The default is false.

Attributes

Remarks

应用程序通常使用相同的字符串资源来实现多种目的,例如菜单项和工具提示。An application commonly uses the same string resource for multiple purposes, such as a menu item and a ToolTip. 但是,菜单通常在菜单项字符串中启用快捷键,由 "与" 字符表示。However, menus often enable accelerators, denoted by an ampersand character, in the menu item string. 工具提示不支持此功能,因此默认情况下,& i i i i i i i i i x 普通字符。ToolTips do not support this capability, so by default, ampersands are just displayed as normal characters. StripAmpersands 属性设置为 "true 将从工具提示文本中删除所有的" & "。Setting the StripAmpersands property to true removes all ampersands from the ToolTip text.

Applies to

See also