Page 1 of 1

Method to get GUI control's default value

Posted: Tue Mar 26, 2019 9:05 pm
by DoctorG
Hello,
is there a method to get a GUI control's default value at run time?

Thanks...
gary

Re: Method to get GUI control's default value

Posted: Tue Mar 26, 2019 9:33 pm
by Cherry Garcia
Gary,

Not at this time. We can add this feature for a future build, if you'd like.

Re: Method to get GUI control's default value

Posted: Thu Mar 28, 2019 4:19 pm
by DoctorG
Hi Cherry,
that would be quite useful and, I assume, relatively simple to do.

The use case is that I initialise some structures with default values of controllers. What I'd like to be able to say is...

for(i=0; i<whatever; i++) {
thing = SomeController.GetDefault();
}

However, I need to look up the default in the Properties view and manually copy the value. Of course, if I change a default then I have to remember to copy the new value. So it's a bit messy.

Many thanks...
gary