Command.GetDisplayName
- Mise à jour2025-07-21
- Temps de lecture : 1 minute(s)
Command.GetDisplayName
Syntax
Command.GetDisplayName( acceleratorPrefix, includeShortcutText)
Return Value
Purpose
Returns text that describes the command to the end user. The default text value is localized for the currently selected language. Typically, this text labels the menu item or button that invokes the command.
Parameters
acceleratorPrefix As String
[In] Specifies the character(s) you want to precede the accelerator character, when one exists, in the display name the method returns. The accelerator prefix for menu items and button labels varies according to the programming environment. For example, LabVIEW uses "_" , LabWindows/CVI uses "__" , and C#, Microsoft Visual C++, and Microsoft Visual Basic .NET use "&" . When you are not assigning the display name to the label of a user interface element that supports accelerators, pass an empty string.
includeShortcutText As Boolean
[In] Pass True to append characters that represent the shortcut key for the command to the display name the method returns. When the command does not have a shortcut key, the display name remains unchanged.