LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Flexible Radio Button Group not work in tab panels

Hello everyone:

  my job contains some mutex selections,and I try to make them into radio button groups.

  I opened a new panel and tried the RadioBG_XXXX functions,it worked fine.But when I supposed to put that panel into tab by using InsertPanelAsTabPage,radios came out,while mutex-selection effects negated.

 Someone got me an idea pls?Cat Frustrated

 

code works:

int panelHandle = LoadPanel (0, "test_sele.uir", Sele);
int ctraryHandle = NewCtrlArray (panelHandle);
RadioBG_CreateFromControlArray (ctraryHandle);
RadioBG_AddOption (ctraryHandle, "Radio 1", -1, 15, 15);
RadioBG_AddOption (ctraryHandle, "Radio 2", -1, 30, 15);
RadioBG_AddOption (ctraryHandle, "Radio 3", -1, 45, 15);

code doesn't work:

int panelHandle = LoadPanel (0, "test_sele.uir", Sele);
DeleteTabPage (mainPanelHandle, Main_Tab, 0, -1); InsertPanelAsTabPage (mainPanelHandle, Main_Tab, -1, panelHandle); int tpHandle = 0; GetPanelHandleFromTabPage (mainPanelHandle, Main_Tab, 0, &tpHandle); int ctraryHandle = NewCtrlArray (tpHandle); RadioBG_CreateFromControlArray (ctraryHandle); RadioBG_AddOption (ctraryHandle, "Radio 1", -1, 15, 15); RadioBG_AddOption (ctraryHandle, "Radio 2", -1, 30, 15); RadioBG_AddOption (ctraryHandle, "Radio 3", -1, 45, 15);

 

0 Kudos
Message 1 of 2
(4,248 Views)

Hello dashenyilang,

how are you discriminating that the second code snippet is not working while the first one works well? I see no code attached to any of the controls you created, and all controls are created from scratch so they have no native code attached: how is this system supposed to work?

Maybe adding some more code from your project will make us understand what you are trying to do so that we can positively help you.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(4,239 Views)