LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

UI to code converter

Hello!
I used the UI to code converter utility to generate the panels using funtions. I have tabbed panels in my uir file. I used easy tab controls to load the tabbed panels.
I was able to load the main panel using the generated fuctions, but I am wondering how do I load the tab panels.

Thanks.
tmach
0 Kudos
Message 1 of 6
(2,977 Views)
The same way you normally would using the easytab .fp and using the handles created by the createpanels function call.
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
0 Kudos
Message 2 of 6
(2,977 Views)
yes but my original easy tab function is like this:
-------------------------------------------------------
EasyTab_LoadPanels (panelHandle,mainTabCtrl, 1,"c:\\PmtCodeloader\\GUI\\Codeloader1.uir",__CVIUserHInst, Block, &BlockHandle, Polar, &PolarHandle, 0);
-------------------------------------------------------
where BlockHandle and PolarHandle are the panel handles for the two tab controls.
Now after I run the UI->code converter utility, I have two functions,
BlockHandle = BuildBlock(0);
PolarHandle = BuildPolar(0);
which I use to generate the panel handles for these tab controls. Now instead of using EasyTab_LoadPanels, I use
-----------------------------------------------------
EasyTab_AddPanels (panelHandle, mainTabCtrl, 1,BlockHandle, PolarHand
le, 0);
-----------------------------------------------------
to add these two tabs to the main panel. But I get the error message saying that the child panels are not correct. Please suggest some getaway from this.

Thanks.
tmach
0 Kudos
Message 3 of 6
(2,977 Views)
Hi,

What type of errors do you get? are they compiler errors or run-time errors? once your chiled panels are loaded with the functions generated by the UI to code converter tool you should be able to call EasyTab_AddPanels(). Make sure that you pass a zero (0) after all of your panel handles. The macro for this function requires this to calculate the number of panels.

I hope this helps.

Juan Carlos
N.I.
0 Kudos
Message 4 of 6
(2,977 Views)
This function adds the specified panels to the Tab control.
EasyTab_AddPanels panels must already be in memory and must be child panels of the panel that owns the Tab control.

Try changing these two lines to:

  BlockHandle = BuildBlock(panelHandle);
  PolarHandle = BuildPolar(panelHandle);

if panelHandle is the handle of the panel containg you tab control.
Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
0 Kudos
Message 5 of 6
(2,977 Views)
Thanks very much. I modified the two lines and everything works without a flaw.

Thanks.
tmach
0 Kudos
Message 6 of 6
(2,977 Views)