LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

a Listbox on a TAB panel

Solved!
Go to solution

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

0 Kudos
Message 1 of 2
(1,949 Views)
Solution
Accepted by topic author Den56

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.



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?
Message 2 of 2
(1,888 Views)