uiform button - part-cw/lambdanative GitHub Wiki
(button . args)
The uiform button element creates a button.
Parameter | Default | Description |
---|---|---|
text | "" | Checkbox label string |
size | normal | String size (normal, small, big) |
color | White | Font color (from modules/ln_core/color.scm) |
action | #f | Function to be called if button is pressed |
rounded | #f | If true, the drawn button rectangle will have rounded corners |
Example
Example 1: A complete page definition with a few buttons, shortened from LNhealth's apps/WidgetDemo
(ex_buttons
"Buttons"
("Prev" main)
("Next" ex_textentry)
(spacer)
(button text "This is a normal button")
(spacer)
(button color ,Black size big text "Custom Button")
)
Example 2: A button with a callback, which sets a UI variable and navigates to a different page.
(button text "Medications" action ,(lambda ()
(uiset 'medsfromwhere 0)
'medications-entry))