CycleButtonΒΆ
-
/libs/granite/ui/components/coral/foundation/cyclebutton
A component that show the current active item. Only one item can be active at the same time. When clicked, the next item of the active is activated. If the last item is clicked, then the first item is activated.
It has the following content structure:
-
granite:CycleButton
- granite:commonAttrs
- granite:renderCondition
- granite:container
-
displayModestring
- icon
- icon
- text
- icontext
The display mode of the cycle button:
- icon
- Icon display mode
- text
- Text display mode
- icontext
- Icon and text display mode
-
variantstring
- actionBar
The variant of the cycle button.
-
displayModestring
Each item has the following structure:
-
granite:CycleButtonItem
- granite:commonAttrs
- granite:renderCondition
- selectedboolean
true
to pre-select this item,false
otherwise.
- textstring
- i18n
The text of the item.
- text_commentI18nstring
I18n comment for the text of the item.
- iconstring
The icon of the item.
Example:
+ mycyclebutton - sling:resourceType = "granite/ui/components/coral/foundation/cyclebutton" + items + button1 - text = "Button1" + button2 - text = "Button2" - text_commentI18n = "Button2 description" - selected = true + actions + action1 - text = "Action1" + action2 - text = "Action2"
-
granite:CycleButton