Page 1 of 1

Selected toggle button

Posted: Fri Jan 04, 2013 4:02 pm
by Mazze
How can I create a toggle button in selected state?

I have tried
<button id="dot_tool_btn" notify="selected" toggle="true" selected="true">Dots</button>
but it renders the button in unselected state.

Regards,
Matthias

Re: Selected toggle button

Posted: Sat Jan 05, 2013 12:40 pm
by airsoftsoftwair
This seems to be a bug. I'll fix this for the next release. Until then, you can just use mui.Set() to set the selection state.

Re: Selected toggle button

Posted: Thu Jan 10, 2013 8:56 pm
by airsoftsoftwair
Actually, the bug is only in mapping the "true" or "false" strings to numbers, so if you just use 1 instead of "true" it should work:

Code: Select all

<button toggle="true" selected="1">Test</button>

Re: Selected toggle button

Posted: Fri Jan 11, 2013 12:52 am
by Mazze
Great, thanks.