ToolStripItem.ProcessMnemonic(Char) 方法

定義

處理助憶鍵字元。Processes a mnemonic character.

protected public:
 virtual bool ProcessMnemonic(char charCode);
protected internal virtual bool ProcessMnemonic (char charCode);
abstract member ProcessMnemonic : char -> bool
override this.ProcessMnemonic : char -> bool
Protected Friend Overridable Function ProcessMnemonic (charCode As Char) As Boolean

參數

charCode
Char

要處理的字元。The character to process.

傳回

Boolean

所有情況下都是 truetrue in all cases.

備註

呼叫這個方法的目的,是讓專案有機會處理助憶鍵字元。This method is called to give an item the opportunity to process a mnemonic character. 方法應該判斷專案是否處於處理助憶鍵的狀態,以及指定的字元是否代表助憶鍵。The method should determine whether the item is in a state to process mnemonics and if whether the given character represents a mnemonic. 如果是的話,方法應該執行與助憶鍵相關聯的動作並傳回 trueIf so, the method should perform the action associated with the mnemonic and return true. 如果沒有,則方法應傳回 falseIf not, the method should return false.

這個基底類別執行依賴主 ToolStrip 控制項來呼叫 IsMnemonic 方法,以判斷指定的字元是否符合專案文字中的助憶鍵。This base-class implementation relies on the host ToolStrip control to call the IsMnemonic method to determine whether the given character matches a mnemonic in the item's text. 在此情況下,方法會引發 Click 事件並傳回 trueIn this case, the method raises the Click event and returns true.

適用於