Search code examples
lwuitcodenameone

Selected Button


At the Theme-Builder of i can change the layout of an selected button. Per default, the text of the button is underlined when it is selected.

So my question is, how can i select a button? There is no setSelected() like for radiobuttons.


Solution

  • Selected means focus unlike the checked/unchecked state of a checkbox/radio button. You will get to this state when using the keypad to move focus to the button.

    If you want a pressed button that remains pressed (toggle button) then just use a checkbox and set it to toggle button mode.