Highlight the button by default

Hai,

I am using two buttonsgroupitems in mobile app.When am go that page want to highlight the 1st button by default..Any one can help me



Thanks,

Jeyasri

Hi Jeyasri,

Make sure the Variable you are using to store what button was selected has a default value that matches the value of the 1st button.

Jorge Martins wrote:

Hi Jeyasri,

Make sure the Variable you are using to store what button was selected has a default value that matches the value of the 1st button.


Hai Jorge,

I assigned the textvariable for button group, buttongroupitem1 value is "Issue" then buttongroupitem2 value is "Suggestion".. like 


Solution

Jeyasri,

Your ButtonGroup has a Variable property, and you will need to assign some variable there.

When the ButtonGroup is rendered, it will try to match the value of the variable you assigned to the Variable property with the value you assigned to the Value property of any of your ButtonGroupItems. If there is a match, that ButtonGroupItem will be highlighted.

in your case, if your textvariable has the value "Issue" then the ButtonGroupItem1 will be rendered highlighted; if it has the value "Suggestion" then the ButtonGroupItem2 will be rendered highlighted; if it has any other value (including "", which is the default value for the Text data type) then none of the ButtonGroupItems will be highlighted.  

Solution