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 
Switch to threaded view of this topic Create a new topic Submit Reply
Automatic Linefeed between TEXT Widgets... [message #6251] Fri, 31 May 1996 00:00 Go to next message
Luis E. Liziola is currently offline  Luis E. Liziola
Messages: 2
Registered: May 1996
Junior Member
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.)

Do you know how yo do this ?

Thanks
Re: Automatic Linefeed between TEXT Widgets... [message #6342 is a reply to message #6251] Mon, 03 June 1996 00:00 Go 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
Re: Automatic Linefeed between TEXT Widgets... [message #6344 is a reply to message #6251] Sun, 02 June 1996 00:00 Go to previous message
Peter Mason is currently offline  Peter Mason
Messages: 145
Registered: June 1996
Senior Member
On 31 May 1996, Luis E. Liziola 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.)
>
> Do you know how yo do this ?

Use: WIDGET_CONTROL,next_text_widget_id,/INPUT_FOCUS
in your event handler.

Peter Mason
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Pull Down Menus
Next Topic: inlcude files

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

Current Time: Wed Oct 08 11:31:58 PDT 2025

Total time taken to generate the page: 0.00606 seconds