LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

I have created easy tab using canvas,but i am not able to get os send information to those panels which are in easy tab using there handles only?

I have created easy tab using canvas,but i am not able to get os send information to those panels which are in easy tab using there handles only?Smiley Sad
0 Kudos
Message 1 of 4
(3,402 Views)

This is strange: the EasyTab instrument allows you to address every control on the tabbed panels via their panel handle / control ID. The procedure to create a tab control is the following:

 // Load the panel with the canvas control
 tmpH = LoadPanel (0, "MyUir.UIR", PANEL);
 // Load individual panels to be added to the tab control
 pnl1H = LoadPanel (tmpH, "MyUir.UIR", PANEL_2);
 pnl2H = LoadPanel (tmpH, "MyUir.UIR", PANEL_3);
 pnl3H = LoadPanel (tmpH, "MyUir.UIR", PANEL_4);
 pnl4H = LoadPanel (tmpH, "MyUir.UIR", PANEL_5);
 // Create the tab control and add tabs to it
 EasyTab_ConvertFromCanvas (tmpH, PANEL_CANVAS);
 EasyTab_AddPanels (tmpH, PANEL_CANVAS, 1, pnl1H, pnl2H, pnl2H, pnl4H, 0);
 DisplayPanel (tmpH);

After that, you should be able to set / get the values of a tabbed panel control using Set/GetCtrlVal, this way:

 SetCtrlVal (pnl1H, PANEL_2_NUMERIC, 123.45);

Now, are you getting some errors? Is the tab control being displayed correctly?
BTW, which version of CVI are you using? Can you create a small project that shows the same problem and post it to the forum, so that we can look at it?



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?
0 Kudos
Message 2 of 4
(3,394 Views)
thanks a lot ,
with some changes my code started working.
 
actually i was using EasyTab_LoadPanels instead of EasyTab_AddPanels.
 
could you tell why possibly it was not working?
0 Kudos
Message 3 of 4
(3,378 Views)
Well, AddPanels and LoadPanels work in the same way for what refers to the tab control behavoiur. I normally use LoadPanels + AddPanels because I often have to customize control on the tabbed panels in a way that is not possible with LoadPanels (adding a callback value to them), but I have satisfactory used LoadPanels as well. The only idea that comes to me is that you may have passed to LoadPanels the panel handles variables instead of a pointer to them: if you do not pass the pointers the panel handles are not passed back to the caller function so they are not properly populated when you call SetCtrlVal later: you could examine panel handle variables putting a breakpoint when you are setting the control values.


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?
0 Kudos
Message 4 of 4
(3,374 Views)