Radio Button Group not showing in tab

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
dennisw
Profound User
Posts: 37
Joined: Thu Oct 15, 2009 4:34 pm
First Name: Dennis
Last Name: Willett
Company Name: Toledo CLinic
Contact:

Radio Button Group not showing in tab

Post by dennisw »

I have a couple radio buttons on a tab. There are bound to the same group variable They don't show up on the tab. If I unbind them from the group variable or move them off the tab they show up.

Any ideas?

ON another screen I have a radiio button group on a tab but it is inside a subfile grid. These show up fine.
Last edited by dennisw on Fri Mar 28, 2014 1:57 pm, edited 1 time in total.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Radio Buton Group not showing in tab

Post by Scott Klement »

When you say "on a tab", do you mean a tab panel?

Do you have anything set differently for the 'visibility' property of these radio buttons? This sometimes causes issues on a tab panel.
dennisw
Profound User
Posts: 37
Joined: Thu Oct 15, 2009 4:34 pm
First Name: Dennis
Last Name: Willett
Company Name: Toledo CLinic
Contact:

Re: Radio Buton Group not showing in tab

Post by dennisw »

Yes, a tab panel.

I do have visibility indicator.

I found when I put the buttons in a simple conatiner they work fine.

What it didn't seem to like was the group variable on the buttons.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Radio Button Group not showing in tab

Post by Scott Klement »

Dennis,

To explain a bit... a "tab panel" is not a native HTML object. The way our widget works is it draws something that looks like a tab panel (using other HTML tags) and then when you switch tabs it goes through all of the widgets and changes their visibility property. So if you click on tab 1, it loops through all widgets on all other tabs (2, 3, 4, etc... all but 1) and sets their visibility to "hidden". When you click on tab 2, it loops through all widgets on tab 1, 3, 4, etc and sets them to hidden, and it sets the stuff on tab 2 to visible. That's how it's able to act like a tab panel.

The trouble occurs when you control the visibility property in your program. When that happens it has a conflict. Even though it finds your widget on a tab, it can't set it to "hidden" or "visible" because you're already controlling that property in your program. So, this way, it's possible for stuff to show up when you are showing the wrong tab, etc.

The easy workaround, as you've already discovered, is to put a layout in the tab panel (simple container layout is a good choice, since it's invisible.) In this case, the tab sees the layout as the widget inside of it (rather than the widgets that are inside the layout), so it will mark the layout hidden or visible. Since hiding a widget hides everything inside of it, this causes tab switching to work fine. And, since the individual widgets visibility can still be controlled by your program, it offers the best of both worlds.

For that reason, I think that the problem you encoutnered was probably with the visibility property rather than the group field. (At least, that would make sense, and fit the symptoms -- I can't think of any reason a grouping field would affect whether your radio buttons are displayed or not.)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests