comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Automatic Linefeed between TEXT Widgets...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Automatic Linefeed between TEXT Widgets... [message #6342 is a reply to message #6251] Mon, 03 June 1996 00:00 Go to previous messageGo to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
"Luis E. Liziola" <liziola@piura.colorado.edu> wrote:
>
> I have a question on widgets...
>
> I have a few text widgets, one after another one...
>
> When I finish editting one TEXT Widget, I Press return and
> I want my cursor to go to the next TEXT Widget below.
> (I dont want to use the mouse to move the cursor to the
> next TEXT Widget.)

Basically you look for the Return character in your event
handler, and use the /INPUT_FOCUS keyword to WIDGET_CONTROL()
to give the next text widget input focus:

In your event handler:

"WIDGET_TEXT_CH":
WIDGET_CONTROL, event.id, get_value=text
state.text = text ; Store the text somewhere
if ( event.ch eq 10B ) then begin
WIDGET_CONTROL, next_text_widget, /input_focus, get_value=txt
WIDGET_CONTROL, next_text_widget, $
set_text_select=[strlen(txt(0)), 0]
endif else begin
....
endelse
end

I've mailed you a short routine called GET_TEXT.PRO that brings
up a popup widget and allows you to enter text in one or more
text widgets. It's pretty easy to use, and it will show you in
more detail how to do this. If anyone else is interested in
this, let me know.

David Foster
UCSD Brain Image Analysis Laboratory
foster@bial1.ucsd.edu
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Pull Down Menus
Next Topic: inlcude files

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:11:24 PDT 2025

Total time taken to generate the page: 0.00376 seconds