LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the initial state of the text button?

Solved!
Go to solution
blank_page

hi, everyone

 

I try to use the below function to change the initial state of the text button when my exe file is runing,

 

SetCtrlAttribute (panelHandle, PANEL_TOGGLEBUTTON, ATTR_DFLT_VALUE, 1); //---> change initial state = 1;

 

It's work as my require.

 

But when i colse my exe file and restart, it restores before setting state.

 

I want to know how to keep the initial state of tne text button before i set in exe file runing?

 

Thank you!

0 Kudos
Message 1 of 3
(4,164 Views)
Solution
Accepted by topic author a710756

Initial state of a toggle button is the one established in the UIR editor before program runs, in the property panel whose screenshot you have attached. I'm not aware of a way to programmatically change the UIR, especially if the target machine hasn't the development system installed on.

If for some reason you don't want to change the default value in the UIR editor, then what you have to do is to set the corresponding attribute BEFORE the panel is displayed and possibly call DefaultCtrl before setting the default value so that the control is programmatically set to the default value you have just set, whichever it is.

Message Edited by Roberto Bozzolo on 12-07-2009 07:36 PM


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?
Message 2 of 3
(4,137 Views)

hi, Roberto Bozzolo

 

Thank you for your help !

0 Kudos
Message 3 of 3
(4,114 Views)