Share via


ComboBoxContentControl.SetPlaceholderText 方法

定義

顯示 T:Microsoft.Office.Interop 中的文字。Word。BuildingBlock、、 Range或 字串做為 中的ComboBoxContentControl佔位元文字。

public void SetPlaceholderText (Microsoft.Office.Interop.Word.BuildingBlock BuildingBlock = default, Microsoft.Office.Interop.Word.Range Range = default, string Text = "");
abstract member SetPlaceholderText : Microsoft.Office.Interop.Word.BuildingBlock * Microsoft.Office.Interop.Word.Range * string -> unit
Public Sub SetPlaceholderText (Optional BuildingBlock As BuildingBlock = Nothing, Optional Range As Range = Nothing, Optional Text As String = "")

參數

BuildingBlock
BuildingBlock

Microsoft.Office.Interop.Word.BuildingBlock,內含預留位置文字。

Range
Range

Range,內含預留位置文字。

Text
String

預留位置文字。

備註

佔位元文字會顯示,直到使用者編輯控件、將控件填入數據源中的數據,或刪除控件的內容。

當您呼叫 SetPlaceholderText 方法時,只會使用其中一個參數。 如果指定多個參數,Microsoft Office Word 會使用第一個指定的參數。 如果省略所有參數,佔位元文字就是空字串。

若要取得 的 ComboBoxContentControl佔位元文字,請使用 PlaceholderText 屬性。 您也可以使用這個屬性,將佔位元文字設定為字串。

適用於