From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

control initially hidden option CVI 2015

Solved!
Go to solution

Hi,

I'd like to insert a string control that will be hidden in the beginning of the program (only after few commands the text box apear).

I sew the hidden option in the control setting but when i'm choosing the checkBox i can't see this control on the UI.

can you explain me how to use this option?

Eliran 

0 Kudos
Message 1 of 5
(3,831 Views)
Solution
Accepted by topic author EliranMar3005

If you set the visibility of your control to initially hidden you can change it at run time using the function call

 

SetCtrlAttribute ( panel_handle, PANEL_MYSTRINGCONTROL, ATTR_VISIBLE, 1 );

 

here panel_handle is the handle returned from calling the function LoadPanel(), panel_handle = LoadPanel (...,...,...);

PANEL_MYSTRINGCONTROL is a place holder for the name of your string control.

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

Thank you very much!

Can you explain me what is the ATTR_VISIBLE please?

0 Kudos
Message 3 of 5
(3,795 Views)
Solution
Accepted by topic author EliranMar3005

...let me try Smiley Wink

 

The function SetCtrlAttribute has four arguments (as is detailed here).

The first two specify the panel and the control, the third which attribute you would like to set, e.g. if your control should be bold, dimmed, hidden,... So this third parameter actually tells the function what to do, in your case you want to change visibility, and the corresponding control attribute is called ATTR_VISIBLE. The fourth parameter then determines the value of this attribute, i.e., if the control is to be set visible (1) or not (0).

0 Kudos
Message 4 of 5
(3,789 Views)

Thank you for the explanation!
I'm new with this program and I am learning it now.
You helped me a lot!

Eliran

0 Kudos
Message 5 of 5
(3,785 Views)