Editable Text Max Value

Post Reply
flucatcher
Posts: 52
Joined: Mon Jan 28, 2019 5:51 am

Editable Text Max Value

Post by flucatcher » Sat Jul 25, 2020 9:32 am

In the designer its possible to set the Max Value of editable text (with Is Number Editor on). Unfortunately it doesn't allow setting this value programatically. Does anyone know a workaround for this? Or, alternatively, Cherry Audio, is this a feature you could add?

Regards
Tobias

arbuxMusic
Posts: 44
Joined: Sun Aug 25, 2019 10:26 am

Re: Editable Text Max Value

Post by arbuxMusic » Mon Jul 27, 2020 10:18 am

In VoltageModularDesign v2.0.25, an Editable Text control (aka a VoltageLabel) has min and max settings under the "Is Number Editor" checkbox. In the generated code, there is a method call that sets the range:

Code: Select all

editableText1.SetIsNumberEditor( true );
editableText1.SetNumberEditorRange( 0, 101 );
editableText1.SetNumberEditorInterval( 1 );
The SetNumberEditorRange can also be called in methods to change the upper/lower range.

Is that what you were after?

flucatcher
Posts: 52
Joined: Mon Jan 28, 2019 5:51 am

Re: Editable Text Max Value

Post by flucatcher » Tue Jul 28, 2020 12:32 pm

Yes! Thats what I’m after, will give it a try, thanks for the help!

Post Reply