12-07-2009 02:36 AM
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!
Solved! Go to Solution.
12-07-2009 12:35 PM - edited 12-07-2009 12:36 PM
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.
12-07-2009 06:19 PM
hi, Roberto Bozzolo
Thank you for your help !