-
Notifications
You must be signed in to change notification settings - Fork 18
pyui.set_control_cuebanner
fabian-flassig edited this page Aug 25, 2026
·
1 revision
Sets the cue banner (placeholder text) of a control. The cue banner is displayed in grey inside the control as long as the control is empty and does not have the input focus. It is not part of the control content and is never returned as a value.
pyui.set_control_cuebanner(control, text)
control:set_control_cuebanner(text)| Type | Description | |
|---|---|---|
control |
control_handle |
Control handle |
text |
string |
Placeholder text, or an empty string to remove the cue banner |
None
- Supported control types are create_text_box, create_text_display, create_text_spin and create_combo_box. For any other control type the function raises an error. Multi-line controls (create_text_area) and create_drop_list do not support cue banners.
- The cue banner is a property of the created window. Set it while the dialog is open (in the dialog function or in a handler), not before the control exists.
- Use pyloc for the text so that the placeholder is translated together with the rest of the dialog.
local function on_dialog(dlg)
local name = pyui.create_text_box(dlg, "")
pyui.set_control_cuebanner(name, pyloc "Part name")
local search = pyui.create_combo_box(dlg, {"Board", "Rail", "Panel"})
search:set_control_cuebanner(pyloc "Search...")
endMinimum PYTHA Version: V27
Control Gallery, set_control_text, create_text_box, create_combo_box, Localization and Translation