05-11-2015 04:09 AM - edited 05-11-2015 04:15 AM
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?
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);
05-11-2015 05:38 AM
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.