LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting EasyTab_LoadPanels to LoadPanel

Solved!
Go to solution

Hi all,

 

Currently I am migrating from labwindows 2008 to , and my stumbling block is to convert EasyTab controls to Tab control, one of the function that I am using is EasyTab_LoadPanels in one of the code line as :

 

int retcode = EasyTab_LoadPanels(*handle,tab_ctrl,1,w->uirname,__CVIUserHInst,tab->tab_id,&newTabControlHandle,0);

 

Could anyone suggest a piece of code or suggestion how can convert it to Tab control, without errors, would using LoadPanel be all?

 

Appreciate the help!

 

Thanks,

Riddhi

0 Kudos
Message 1 of 3
(2,019 Views)
Solution
Accepted by topic author riddhi_shah

Using the old EasyTab control implied a bit of code to have it work correctly: you had to design your pages in the UIR editor as separate panels and load them at runtime with EasyTab_LoadPanels or EasyTab_AbbPanels. This is no more needed with native Tab controls: you can design the tab pages directly in the UIR editor and have them ready at runtime simply loading the panel that holds the tab control.
Nevertheless, you may need for some reason to add pages to the tab control at runtime, so that functionality has been maintained: you can add pages to a tab control by using InsertPanelAsTabPage () command.

If you are upgrading an old application the easiest you can do is to directly copy and paste your panels into tab pages and get rid of all EasyTab code. You will need to call GetPanelHandleFromTabPage () command to get the panel handle to be used to address controls into individual tab pages.



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 3
(1,951 Views)

Thanks Roberto, 

 

Would there be any example that I can take a look at, please share if there is one? Sorry Found it.

 

-Riddhi

0 Kudos
Message 3 of 3
(1,938 Views)