LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I create window form/panel and components without using GUI in the first place?

I have a request that creates a window form in run-time, then create button, textbox, label ... on it, even waiting for a key trigger ... then close it afterward.
 
I know that I can create a panel then load/activate it in run-time, I also can hide components in the first palce then enable them when they are needed! I also know that I can popup a Message Dialog, a list panel and a Graphic panel (they are not complete as requested)!
 
However, can we avoid to create a panel and components in-advance (create them only when request)?
 
Thanks to any help
0 Kudos
Message 1 of 4
(3,143 Views)

Sure! NewPanel, SetPanelAttribute, NewCtrl, SetCtrlAttribute and InstallCtrlCallback are what you need do perform this task. Smiley Wink It's not a complicated task, but it's long and may be boring: all actions you perform in the UIR editor need to be substituted by several SetXxxAttribute, which can be not so easy to determine.

There used to be a little option in the UIR editor, however, to transform a panel in the source code needed to create it: I cannot remember how to do it now, but in a few hours I'll be back in the office and I will point you in the right direction. With this option you can create the desired panel in the UIR editor and next create the code to generate it at run time: this code can be integrated in your application and used when needed.



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,144 Views)


@Roberto Bozzolo wrote:

There used to be a little option in the UIR editor...



It's the Ui to code converter located in Tools menu.


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 3 of 4
(3,138 Views)
Many thanks for this help Smiley Happy Smiley Happy Smiley Happy
0 Kudos
Message 4 of 4
(3,122 Views)