11-02-2012 02:08 AM
I am using LabWindows CVI 10.0. My intention is to programmatically disable a control array in a panel.
Problem:
I am loading a panel with control array in TabControl pages - Tab0 and Tab1.
Error occurs, While programmatically accessing through below functions.
GetCtrlArrayFromResourceID( Tab0_panel, CTRLARRAY) - Able to get resource ID.
GetCtrlArrayFromResourceID( Tab1_panel, CTRLARRAY) - Not able to get resource ID.
Its giving error as Resource ID not found in UIR.
Error picture i have attached below for reference.
Please give some suggestions.
Solved! Go to Solution.
11-02-2012 02:14 AM
Hi Zorro,
just a guess: tab panels are somewhat tricky, one of the usual stumbling blocks is the wrong handle...: did you use GetPanelHandleFromTabPage ( panel_handle, PANEL_TAB, 0, &tabpanel_0_handle ) etc.?
11-02-2012 02:52 AM
No i Used, GetCtrlArrayFromResourceID(tab0_panel, CTRLARRAY);
Because for the 1st loaded panel i am able to retrieve CTRLARRAY Ref.
But for 2nd one can't able to retrieve
11-02-2012 03:13 AM
Ok, if you didn't use it so far you should use it now : If you are accessing controls on a tab panel you have to use the correct panel handle using the function GetPanelHandleFromTabPage, you can not simply use the constant defined in your UIR.
Have a look at the example TabExample.cws for an example of this function.
11-02-2012 03:19 AM
Hi Wolfgang,
Thanks for the reply.
But i am using Easy Tab Control.. Is it same as Tab?
11-02-2012 03:28 AM
Ah,... this you should have mentioned earlier...: No, it's not the same.
Moreover, EasyTab is outdated and superseded, so I suggest moving your UI to true tab panels
11-02-2012 03:30 AM
OK, Wolfgang. I will try New Tab Control...
Thanx for ur ideas.
11-02-2012 03:36 AM
My pleasure!