Common Options¶
Most controls share the same groups of properties in the Properties panel. This page describes them once. The page of each control lists what is specific to it.
Select a control on the canvas and open Properties on the right. The tabs at the top (All, General, Data, Features, Events, Style) filter the list. Not every control has every group.
General¶
| Property | Description |
|---|---|
| Name | The unique name of the control in the form. Names must be unique within the form. |
| Caption | The text of the control, for controls that have text, such as a label. |
| Tooltip | A message shown when the pointer rests on the control. |
Data¶
| Property | Description |
|---|---|
| Model Binding | The value of the form's view model that the control shows or edits. For editable controls, such as a text box or a check box, the binding works both ways: a change in the model updates the control, and a change in the control updates the model. |
Choose the binding with the three dots next to the field. Controls that take their options from data, such as a dropdown or a list, also have a Dataset setting.
Features¶
Settings specific to the kind of control. For a label these include Value Format and Render As Html.
Events¶
Events say what the control does in response to the user. Each event can run a controller action. Click the three dots next to an event to set it.
| Event | When it fires |
|---|---|
| On Click | The user clicks the control. |
| On Double Click | The user double-clicks it. |
| On Mouse Enter | The pointer enters the control. |
| On Mouse Leave | The pointer leaves it. |
| On Change | The value of an input changes. |
| On Key Press | The user presses a key. |
Not every control offers every event. Each event runs a controller action, with optional parameters written as Mamba expressions. See the page of each control, and the Button page for the window that sets an event.
Style¶
| Property | Description |
|---|---|
| Color | A colour role from the theme: None, Default, Primary, Success, Info, Warning or Danger. |
| Size | A size role from the theme: None, Extra Small, Small, Normal, Large or Extra Large. |
| CSS Class | One or more CSS classes to add, which you style in the theme. |
| CSS Style | Inline CSS for this control only. Prefer a class, which is easier to maintain. |
Roles, not fixed values, are used so that one change in the theme restyles every control of that role.
Visibility and formatting¶
Whether a control is visible or styled differently under a condition is set in the form editor with conditional formatting and calculated expressions, not on the control. Remember that these expressions run in the browser. See Behaviour to know.
In Studio¶
Every control has a Style section in its Properties, with Color (a role), Size where the control has one, Variation, CSS Classes, Css Style and Hidden In Mobile Devices. The example is a label.
