LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI Controls not Redrawing when Disabled Changed

Solved!
Go to solution

Hi,

 

I am a bit stuck here.  I use a the disabled property of a control (actually a typdef with lots of controls) to show and hide them when a password is entered.  It works fine IF after I change the password I minimise and maximise the program (in Windows), forcing a complete redraw!

 

I would like to request that the VI redraws itself but dont know how!  I tried using the code shown below with the DeferPanUpdts property but it did not help.  The VI has the control I want to disable on a page in a tab control (shown with red circle).

 

Any ideas?

 

Capture.PNG

Capture2.PNG

0 Kudos
Message 1 of 9
(3,136 Views)

Can you attach your vi? I think your code should work without any special tricks.

(Although that sequence structure makes me cringe a tiny bit... 😃

0 Kudos
Message 2 of 9
(3,120 Views)
Solution
Accepted by RavensFan

It hard to tell from a picture!  What are the properties of the control "Installer Password"  Update while typing?  Limit to single line? We can only guess.


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 9
(3,118 Views)

Why does everyone hate sequence structures???  I am new to LV...  

 

I only added it in a desperate attempt to try solve the problem.  I posted it with the update property set and cleared as I figured it was the first thing that people would say to try (based on other forums I read).

0 Kudos
Message 4 of 9
(3,104 Views)

Sorry, I cannot post the VI, I am not allowed under client confidentiality agreement...

 

The control is justa normal string entry.  but that doesn't matter in this case as that part of the code works perfectly.  It is just that the screen doesn't redraw when the disabled property is changed.  If I force a redraw by resizing the window it draws correctly.

0 Kudos
Message 5 of 9
(3,101 Views)

Because they are always unnecessary and graphically bloated, they tend to break dataflow (the programming paradigme of Labview) and also tend to lead to bad error handling.

But it is only a remark, it will not solve your problem.

 

I made a small test using similar elements and did not see your problem. If you cannot post that vi, make simple example vi demonstrating the same problem and post that instead?

0 Kudos
Message 6 of 9
(3,088 Views)

Or wait, I think I understand what you mean. "Value Change" is only triggered when the control loses focus, when you do a mouse press outside the control for instance or press enter (depending on string control settings).

I am so used of always "clicking out" of the control I did not think about it at first.

 

It is not elegant, but the Key Down Event will do what you want to do.

0 Kudos
Message 7 of 9
(3,082 Views)

Apologies...  the properties of the text entry control do matter.  The problem was that the controls value was only being updated when it lost focus or enter pressed.  There is a property of the control to "update value while typing" which solved the problem.

 

 

The flay sequence structure is all gone now and only the contents of the first frame are required.  Works mint!

 

Seems obvious now!!!

0 Kudos
Message 8 of 9
(3,080 Views)

@JÞB wrote:

It hard to tell from a picture!  What are the properties of the control "Installer Password"  Update while typing?  Limit to single line? We can only guess.


8-Ball calibration batting 1k this week


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 9
(3,052 Views)