ToolStripTextBox.GetPositionFromCharIndex(Int32) 方法

定義

取得控制項中指定字元索引的位置。

public:
 System::Drawing::Point GetPositionFromCharIndex(int index);
public System.Drawing.Point GetPositionFromCharIndex(int index);
member this.GetPositionFromCharIndex : int -> System.Drawing.Point
Public Function GetPositionFromCharIndex (index As Integer) As Point

參數

index
Int32

用來取得位置的字元索引。

傳回

指定字元的位置。

備註

此方法可讓您判斷特定字元索引在控制項中的位置。 你可以用這種方法來執行像是顯示快捷鍵選單項目或控制單字說明資訊等任務。 例如,如果你想在使用者右鍵點擊控制項中的單字時,向使用者顯示選項選單,你可以用此方法判斷該單字的位置,從而正確顯示控制 ContextMenuStrip 項。

適用於

另請參閱