Android Question Panel in panel views

saunwin

Active Member
Licensed User
Longtime User
Hi all,
I have a panel that requires 2 sets of radio buttons.
one set is fine,but to have another set I need to put the RB's in a panel.
So the panel in a panel has a label and 5 buttons.
When I go to position these views in designer (wrt to the panel they're in) , they disappear. they won't reappear unless I remove the designer script lines

Label6.SetTopAndBottom (radiopanel.Top, radiopanel.Top+6%y)
Any ideas
TIA
 
Hi Klaus,
I can't recreate the issue in another project, so I'm uploading the project I'm working on. The issue is radiopanel behaving weirdly.
anyway, a pointer would be helpful if you have the time TIA. Steve
 

Attachments

Upvote 0
Try with
B4X:
Label6.SetTopAndBottom (0, 6%y)
Because the Label will take as reference the Panel that contain it.
So the top of the Panel is 0 for the Label.
 
Upvote 0
Attached you find your modified project.
You defined the backgrond color to white, therefore the radiobuttons were not visible.
Then, you did not set the position of radiopanel.
I set the position of radiopanel, set the position of Label6 and set the vertical positions of the RadioButtons.
Their horizontal positions are given with anchors,
 

Attachments

Upvote 0
Attached you find your modified project.
You defined the backgrond color to white, therefore the radiobuttons were not visible.
Then, you did not set the position of radiopanel.
I set the position of radiopanel, set the position of Label6 and set the vertical positions of the RadioButtons.
Their horizontal positions are given with anchors,
Wow, thank you Klaus. Not sure why I can't see the radiopanel when I run the designer script, but hey ho, it's now compiling and looking good. Many thanks.
 
Upvote 0
I had seen it too and have looked deeper to it.
In the DesignerScript replace this line:
B4X:
radiopanel.SetTopAndBottom(g3b.Top, 32%y)
By this one:
B4X:
radiopanel.SetTopAndBottom(g3b.Top, g3b.Top + 32%y)
 
Upvote 0
I had seen it too and have looked deeper to it.
In the DesignerScript replace this line:
B4X:
radiopanel.SetTopAndBottom(g3b.Top, 32%y)
By this one:
B4X:
radiopanel.SetTopAndBottom(g3b.Top, g3b.Top + 32%y)

Well spotted Klaus. Appreciate your expertise. Many thanks. Steve
 
Upvote 0
Back
Top