TX Text Control .NET for Windows Forms

GetKeyTip Method

Method|Introduced in 27.0
Namespace
TXTextControl.Windows.Forms
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets the key tip that is associated with an item and specified by the identifier parameter. Such an identifier can be the string conversion of an enumeration that is associated with an item (such as RibbonFormattingTab.RibbonItem.TXITEM_Paste). By default CultureInfo.CurrentUiCulture determines the language of the key tip resources. If no resource translation is provided, that corresponds to the current ui culture or the value of the culture parameter, the returned key tip is based on the English resources.

Syntax

GetKeyTip(string)

Gets the key tip that is associated with the specified item identifier.

public static string GetKeyTip(string identifier);
ParameterDescription
identifier

The identifier of the item that is associated with the requested key tip.

GetKeyTip(string, CultureInfo)

Gets the key tip that is associated with the specified item identifier in the specified language.

public static string GetKeyTip(string identifier, CultureInfo culture);
ParameterDescription
identifier

The identifier of the item that is associated with the requested key tip.

culture

Specifies the language in which the key tip is returned.

Return Value

The key tip that is assigned to the item. If no key tip is associated with the source, the method returns an empty string.

Examples

The following example retrieves key tip from the resource provider.

var result = TXTextControl.Windows.Forms.ResourceProvider.GetKeyTip("Quarterly report", System.Globalization.CultureInfo.GetCultureInfo("en-US"));
Console.WriteLine($"Get Key Tip result: {result}");