Add Form Controls
Methods to add UI controls to a form in Launchpad
AddHeader
Adds a header text to the form.
public void AddHeader(string text, double fontSize = 16)Parameters:
text: Text of the header.fontSize: Optional. Font size of the header. Default is16.
AddLabel
Adds a label to the form.
public void AddLabel(string text, double fontSize = 11, bool isItalic = false, bool isBold = false)Parameters:
text: Text of the label.fontSize: Optional. Font size of the label. Default is11.isItalic: Optional. Indicates whether the text should be italic. Default isfalse.isBold: Optional. Indicates whether the text should be bold. Default isfalse.
AddTextInput
Adds a text input field to the form.
Parameters:
label: Label for the text input.defaultValue: Optional. Initial value of the text input. Default is empty string.isEnabled: Optional. Indicates whether the control is enabled. Default istrue.
AddComboBox
Adds a dropdown selection box to the form.
Parameters:
label: Label for the combo box.items: List of items to display in the combo box.displaySelector: Optional. Function to convert items to display strings. Default isnull.isBold: Optional. Indicates if the label should be bold. Default istrue.selectedItem: Optional. The initially selected item. Default is the default value of typeT.
AddListBox
Adds a list box to the form.
Parameters:
label: Label for the list box.items: List of items to display in the list box.displaySelector: Optional. Function to convert items to display strings. Default isnull.allowMultiple: Optional. Indicates whether multiple selection is allowed. Default isfalse.height: Optional. Height of the list box. Default is100.
AddRadioButtons
Adds a group of radio buttons to the form.
Parameters:
label: Label for the radio button group.options: List of options to display as radio buttons.defaultSelected: Optional. The initially selected option. Default is the first option.
AddCheckbox
Adds a checkbox to the form.
Parameters:
label: Label for the checkbox.isChecked: Optional. Initial checked state of the checkbox. Default isfalse.
AddSlider
Adds a slider control to the form.
Parameters:
label: Label for the slider.minimum: Optional. Minimum value of the slider. Default is0.maximum: Optional. Maximum value of the slider. Default is100.value: Optional. Initial value of the slider. Default is50.tickFrequency: Optional. Frequency of tick marks. Default is10.showValue: Optional. Indicates whether to display the current value. Default istrue.isBold: Optional. Indicates if the label should be bold. Default istrue.
AddLink
Adds a hyperlink to the form.
Parameters:
text: Display text for the hyperlink.url: URL to navigate to when the link is clicked.fontSize: Optional. Font size of the link. Default is11.
AddFileSelector
Adds a file selection control to the form.
Parameters:
label: Label for the file selector.filter: Optional. File filter string for the file dialog. Default is "All files (.)|.".
AddMultiFileSelector
Adds a control for selecting multiple files.
Parameters:
label: Label for the multi-file selector.filter: Optional. File filter string for the file dialog. Default is "All files (.)|.".
AddCustomControl
Adds a custom UI element to the form.
Parameters:
control: The UI element to add.
BeginGroupBox
Starts a group box section in the form.
Parameters:
header: Header text for the group box.margin: Optional. Bottom margin of the group box. Default is0.includeScrollbar: Optional. Indicates whether to include a scrollbar. Default isfalse.maxScrollHeight: Optional. Maximum height of the scroll area. Default is200.
EndGroupBox
Ends a group box section in the form.
BeginExpander
Begins an expandable section in the form.
Parameters:
header: Header text for the expander.isExpanded: Optional. Indicates whether the expander is initially expanded. Default isfalse.margin: Optional. Bottom margin of the expander. Default is0.contentIndent: Optional. Indentation of content within the expander. Default is15.showBorder: Optional. Indicates whether to show a border around the content. Default istrue.
EndExpander
Ends an expandable section in the form.
Last updated