08-30-2012 08:20 AM - edited 08-30-2012 08:21 AM
Hi everyone,
It's my application UI reqirement that the two Options of the RadioGroup shoud be placed side by side.
I did not find any way to place them horizontally.
So now I've found one work around for that..I'm placing two RadioGroups (having one one Options) side by side. following is the snippet.
RadioGroup {
id: group1
layoutProperties: AbsoluteLayoutProperties {
positionX: 100.0
positionY: 20.0
}
Option {
id: option1
text: "Male"
onSelectedChanged: {
if (selected) {
option2.selected = false
}
}
}
}
RadioGroup {
id: group2
layoutProperties: AbsoluteLayoutProperties {
positionX: 200.0
positionY: 20.0
}
Option {
id: option2
text: "Female"
onSelectedChanged: {
if (selected) {
option1.selected = false
}
}
}
}
when I select the options turn by turn It works expectedly for first 4 attempts. after that both the options get selected.
Another issue with radio buttons is, I want my first Option of the RagioGroup to be selected initially. for that even if I have set selected property true of any Option, It shows me unselected.
Thanks.
08-31-2012 10:59 AM
Hi,
regarding the layout, I would suggest to add them into a Container, StackLayout with LayoutDirection.RightToLeft, such as
Container {
layout: StackLayout {
layoutDirection: LayoutDirection.RightToLeft
}
RadioGroup { ....
}
RadioGroup { ....
}
}
About your last comment, indeed it works for 4 attempts only, I've added some logs and it seems that it loses the Signal after that. I'll raise a bug for it and paste it here so you can vote on it, ok? It was a good catch.
Thanks.
08-31-2012 11:45 AM
Hi,
Please vote for https://www.blackberry.com/jira/browse/BBTEN-230
Feel free to add any additional comments.
Thanks
09-03-2012 03:34 AM
Ok, We vote for jira link you provided.