Jump to content

change max value of control dynamically


Recommended Posts

I have an array[6] of controls (SGL data type) and need to reassign the 'max value' of all 6 elements so that the user cannot exceed this value. Normally I would set the 'max value' in the data entry box and be done with it, but this has to be reassigned dynamically once the user has determined this value on the fly. I cannot think of any other way to do this except to use a 'value change?' event to compare the entered value to the present desired 'max value' and force the display to adjust the displayed value as necessary. Anyone have a simpler way to do this?

Link to comment

I have an array[6] of controls (SGL data type) and need to reassign the 'max value' of all 6 elements so that the user cannot exceed this value. Normally I would set the 'max value' in the data entry box and be done with it, but this has to be reassigned dynamically once the user has determined this value on the fly. I cannot think of any other way to do this except to use a 'value change?' event to compare the entered value to the present desired 'max value' and force the display to adjust the displayed value as necessary. Anyone have a simpler way to do this?

Create a property node from one of the array elements and use the "Data Entry Limits:Maximum" and "Respone to Value Outside Limits:Maximum" properties. All the array elements will use the new maximum *but* they will keep any old value outside the new max until the user attempts to change that particular element. In other words, they are not immediately coerced; if you want all elements to immediately update, you'll need to do it yourself.

-Scott

Link to comment

I did not see a property for min or max. I did find value, which should be spelled in the plural to eliminate confusion, and used that property in a for loop to changed the out of limit values dynamically.

Here's a snippet what Crossrulz and Scott meant:

post-2399-047157800 1281038452_thumb.png

Ton

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.