Input for WinForms
プレースホルダー

The text-based controls in Input like, TextBox, MaskedTextBox, ComboBox, NumericEdit, DateEdit and DropDownControl, all have a common 'placeholder text' feature. This will enable the users to add a placeholder text to a control using the Placeholder property in the Properties window, or via code.

A placeholder lets you show a text in a control when nothing is selected or displayed in it. This text disappears as soon as a value is entered in the control.

The Placeholder property is a member of the C1DropDownEditorBase, a base class, which is used to represent drop-down controls with text editors.

The code snippet below shows an example of configuring Placeholder in an Input text-based control ComboBox:

C#
コードのコピー
comboBox.Placeholder = "Select an item";