07-22-2019 09:20 AM
I have a List box on a TAB panel (code below) but I get a -60 error "not a list control" and I am trying to dim some buttons. This works on the main panel but not on the TAB panel. What gives?
CheckListItem (panelHandle, TABPANEL_Select_box, 0, 0);
CheckListItem (panelHandle, TABPANEL_Select_box, 1, 0);
CheckListItem (panelHandle, TABPANEL_Select_box, 2, 0);
CheckListItem (panelHandle, TABPANEL_Select_box, 3, 0);
CheckListItem (panelHandle, TABPANEL_Select_box, 4, 0);
CheckListItem (panelHandle, TABPANEL_Select_box, 5, 0);
GetCtrlVal(panelHandle,TABPANEL_Select_box,&value);
SetCtrlAttribute(panelHandle,TABPANEL_2_COMMANDBUTTON_2, ATTR_DIMMED,1); //dimmed
SetCtrlAttribute(panelHandle,TABPANEL_2_COMMANDBUTTON_3, ATTR_DIMMED,1); //dimmed
Solved! Go to Solution.
07-23-2019 06:09 AM
That's a typical error: every tab page is a child panel of the panel the TAB control is on. You can obtain the tab page panel handle by calling GetPanelHandleFromTabPage (); use that handle to address controls on the tab page itself.