LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide dialog until controls on it are initialized?

Solved!
Go to solution
I have a dialog with some controls on it (e.g. tree control).  I like to initialize some properties before the dialog is shown.  For example, I would like to set the active/selected item to be a specific item.  I get this to work, however there is an annoying flicker when the dialog is shown, since the dialog is shown first, then the code that initialized executes.  Is there a way to hide the dialog until it is initialized or other way to work around it?
 
Thanks,
 
Rob
Rob
0 Kudos
Message 1 of 5
(3,299 Views)

Hi Rob,

which dialog did you use? Is this a custom one?

Mike

0 Kudos
Message 2 of 5
(3,296 Views)

Some possibilities

  1. You can hide the tree control with a property node until it is ready?
  2. You can probably eliminate the flicker by defering panel updates while you update the tree control.
  3. ...
0 Kudos
Message 3 of 5
(3,286 Views)
Solution
Accepted by robdevyogi
You can also call the subVI without showing the front panel, then have it show its front panel once the controls are updated.
 
For example, the subVI containing this code will show the panel after 1 second.
 


Message Edited by altenbach on 03-28-2008 06:23 PM
Message 4 of 5
(3,278 Views)

altenbach, your suggestions seemed to work.

For the custom dialog I have, the trick was also to modify the window properties (in VI properties) by unchecking "show front panel when called" so that the VI would be called without any window appearing until I managed to initialize the controls.  Then, I call the FP.close method when done, since the dialog no longer closes automatically.

Thanks,

Rob

Rob
0 Kudos
Message 5 of 5
(3,226 Views)