API ReferenceSandbox.UI
Toolbarclass
A horizontal or vertical strip of commands and controls. Children keep their natural size; when space runs out the strip scrolls. Add ordinary panels directly to embed other controls.
Constructors1
Showing 1 constructors
public Toolbar()
No results match this filter.
Methods6
Showing 6 methods
public Sandbox.UI.Button AddButton(string text, string icon, System.Action clicked)
Add a command. Use empty text for an icon-only button, and set its Tooltip.
| Parameter | Type | Description |
|---|---|---|
| text | string | — |
| icon | string | — |
| clicked | Action | — |
public Sandbox.UI.Button AddMenu(string text, string icon, Sandbox.UI.Menu menu)
Add a dropdown command. The toolbar owns the supplied menu and deletes it with the button.
| Parameter | Type | Description |
|---|---|---|
| text | string | — |
| icon | string | — |
| menu | Menu | — |
public Sandbox.UI.Button AddToggle(string text, string icon, bool value, System.Action`1<bool> changed)
| Parameter | Type | Description |
|---|---|---|
| text | string | — |
| icon | string | — |
| value | bool | — |
| changed | Action<bool> | — |
public virtual void OnButtonTyped(Sandbox.UI.ButtonEvent e)
Arrow keys move between buttons; embedded editors keep their own keyboard behaviour.
| Parameter | Type | Description |
|---|---|---|
| e | ButtonEvent | — |
Returns:
void—No results match this filter.
Properties1
Showing 1 properties
No results match this filter.