time entry in a textfield and text wrap / count in multiline text field
- I've configured a single line text field to use Time as text format: %H:%m, but for some reason if I enter for example 10:20 in the field and click outside the field, the contents change to 10:01. If I try it again it changes to 10:10 and stays that way regardless of what "minutes" value I try to enter. Hours change fine, it's just the minutes which seem to be broken
- I've configured a multiline text field to allow users to enter comments, but I'd like to limit the amount of characters entered to 60, is there a way to somehow stop the user typing when the 60 chars limit is reached? can the contents of the multiline text field be monitored live whilst the user is typing to keep checking the lenght?
- The multiline text field described above is wide enough to hold 15 characters, yet if I enter say 10 and break that up with a space in the middle, the second half gets pushed to the second line. Is there a way to have it carrying on in the same line until the end is reached and only then move over to the second line? most text boxes I've seen in other SCADA packages work this way ie. the size is fixed and the text inside wraps around, even if there's no spaces.
Still looking for ways to count the characters typed in a textedit multiline box, a single textline object has a "text changed" event which is super handy for this, but the multiline object doesn't offer this event for some reason (even though Help says it does). Any ideas are much appreciated, I've tried running a while(true) script in the KeyboardInFocus event, but this slows things waaaay down.
There is a second tab in the Properties of the multitext object. There you can find the text changed event!
I've had a long look at the Expanded tab, but only the top section, where all the parameters are, never noticed the bottom section for events changes!
Is there a way to somehow limit the field to 60 characters like on a single line text object?
do you want it to limit per line for 60 chars? If so you can try using the CursorPositionChanged Script event, which is also available on the extended tab.
This gives you the line and the position number of your cursor. So when entering something in the multiline field you can try checking for the length of the line!