Re: WIDGET_TEXT - HOW TO NOT CHANGE VALUE OF TEXT WHILE EDITING FIELD? [message #34928] |
Fri, 02 May 2003 09:29  |
btt
Messages: 345 Registered: December 2000
|
Senior Member |
|
|
Tobi wrote:
> i have a gui which has a few fields for changing motor positions as a
> widget_text which was made /editable. i also run a timer which looks
> up the motor positions every few seconds and updates the position in
> that field.
>
> sometimes it happens that i want to change one value and when i enter
> the new value, the timer event kicks in and updates the field with the
> current motor position and i have to start over again and press enter
> before it updates again.
>
> is there a way of telling idl not to change the value while the field
> is edited?
>
> thanks!
>
> TOBI
Hello,
Take a peek at the /ALL_EVENTS and /EDITABLE keywords to the
WIDGET_TEXT() function. I think you want to set each of these - but you
have to communicate to the end user that a <return> or <enter> keystroke
is required. If this is the only field you are interested in polling
with the timer events, then you can actually remove the timer event (a
good thing to remove) Instead, use the event generated when the user
hits the enter key after editing your text widget.
ben
|
|
|
Re: WIDGET_TEXT - HOW TO NOT CHANGE VALUE OF TEXT WHILE EDITING FIELD? [message #35011 is a reply to message #34928] |
Mon, 05 May 2003 12:04  |
tbeetz
Messages: 9 Registered: May 2003
|
Junior Member |
|
|
Ben, thanks for the suggestion, but i tried that before and didn't
have luck with that... in my case, say the position is at 0.0 and i
want to enter 3000, the program will start executing as soon as i type
in 3 (it will not wait for me to also enter the other 000 since
/all_events executes every entry). if i leave /all_events out and
only set /editable, i can enter 3000 and hit <enter> to confirm. but
in that case i have the problem which i described before, that another
part of my program (whihc is an automated sequence, that updates the
field) edits the field and sets it back to the value that it was at
before ... removing the timer event is not desirable, since we have a
lot of fields, that we want to have updated every few seconds ...
TOBI
Ben Tupper <btupper@bigelow.org> wrote in message news:<3EB29D03.4030205@bigelow.org>...
> Tobi wrote:
>> i have a gui which has a few fields for changing motor positions as a
>> widget_text which was made /editable. i also run a timer which looks
>> up the motor positions every few seconds and updates the position in
>> that field.
>>
>> sometimes it happens that i want to change one value and when i enter
>> the new value, the timer event kicks in and updates the field with the
>> current motor position and i have to start over again and press enter
>> before it updates again.
>>
>> is there a way of telling idl not to change the value while the field
>> is edited?
>>
>> thanks!
>>
>> TOBI
>
> Hello,
>
> Take a peek at the /ALL_EVENTS and /EDITABLE keywords to the
> WIDGET_TEXT() function. I think you want to set each of these - but you
> have to communicate to the end user that a <return> or <enter> keystroke
> is required. If this is the only field you are interested in polling
> with the timer events, then you can actually remove the timer event (a
> good thing to remove) Instead, use the event generated when the user
> hits the enter key after editing your text widget.
>
> ben
|
|
|