LGUI2:button
Jump to navigation
Jump to search
A LavishGUI 2 button element is a standard Content Container element, with the added behavior of accepting Keyboard Focus when clicked.
Defining a button element
A button element is a Content Container with no additional properties.
Clicks on buttons are handled with Event Handlers in the same way as clicks on all other elements. See Base Element events
Examples
- A button element, with a 1 pixel thick white border around a black background containing a textblock.
- When clicked, this button will execute the LavishScript code: MyController:HandleButton1
{ "type": "button", "name": "button1", "content": "My border has some text!", "borderBrush": { "color": [ 1.0, 1.0, 1.0 ] }, "backgroundBrush": { "color": [ 0, 0, 0 ] }, "borderThickness": 1 "eventHandlers": { "onMouseButtonMove": ["method","MyController","HandleButton1"] } } }