LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Control Array Access Problem while loading panel on 2 Tabs

Solved!
Go to solution

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.Smiley Frustrated

0 Kudos
Message 1 of 8
(3,634 Views)

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.?

0 Kudos
Message 2 of 8
(3,632 Views)

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

0 Kudos
Message 3 of 8
(3,629 Views)

Ok, if you didn't use it so far you should use it now Smiley Wink : 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.

 

 

0 Kudos
Message 4 of 8
(3,625 Views)

Hi Wolfgang,

 

Thanks for the reply.

But i am using Easy Tab Control.. Is it same as Tab?

 

 

0 Kudos
Message 5 of 8
(3,623 Views)
Solution
Accepted by topic author CVI_Zorro

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

0 Kudos
Message 6 of 8
(3,621 Views)

OK, Wolfgang. I will try New Tab Control...

 

Thanx for ur ideas.

0 Kudos
Message 7 of 8
(3,619 Views)

My pleasure!

0 Kudos
Message 8 of 8
(3,616 Views)