sydney Posted August 5, 2010 Report Share Posted August 5, 2010 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? Quote Link to comment
crossrulz Posted August 5, 2010 Report Share Posted August 5, 2010 You can use a property node to set the Minimum and Maximum values of the control inside the array. All items in the array will have the same properties (not sure if you care about that). Quote Link to comment
smenjoulet Posted August 5, 2010 Report Share Posted August 5, 2010 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 Quote Link to comment
sydney Posted August 5, 2010 Author Report Share Posted August 5, 2010 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. Quote Link to comment
Ton Plomp Posted August 5, 2010 Report Share Posted August 5, 2010 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: Ton Quote Link to comment
sydney Posted August 11, 2010 Author Report Share Posted August 11, 2010 [i did not realize that there was a RespToOutLimits.Max property! I did find the Max and Min properties, but without coercing that control didn't work as I wanted. So many properties, so little time. Thanks Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.