Edit control that can reflect values


Recommended Posts

The Edit Box under Controls doesn't reflect a channel or variable's current value. I find that complicates the user interface by requiring a separate variable display and some kind of labeling to distinguish actual values from last-entered-values. That's easy enough and perhaps an aware edit box could be accomplished with scripting or component messages but the Variable Value Display+Edit Box Control seems like a natural pairing - I hope it makes it into the next release.

Link to comment
Share on other sites

Actually, the problem with that is that if the user is editing in the box and then it changes on them, it can be really annoying. You can programmatically tell edit controls to refresh the edit boxes to whatever the set variable is currently set to using UpdateEdits(). This can either be for all the controls in a single page:

page.mypage.updateEdits()

or all the edit controls everywhere:

page.updateEdits()

Link to comment
Share on other sites

I agree the user's input should take precedence while the edit control is active. If used for the wrong type of variable, it could be updating during or right after their entry which would become very annoying. I still think it would be a useful component for quasi-static values such as thresholds or set points, log file name masks and other values not controlled programmatically elsewhere.

I'll have to experiment with Page.UpdateEdits() to find the most appropriate place to call it from. Thanks for pointing this function out!

Link to comment
Share on other sites

  • 2 years later...

Archived

This topic is now archived and is closed to further replies.