comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Automatic Linefeed between TEXT Widgets...
items: Re: Automatic Linefeed between TEXT Widgets...

Automatic Linefeed between TEXT Widgets...
type: item
description: 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
creator: Luis E. Liziola
date: 1996-05-31T07:00:00-00:00

Re: Automatic Linefeed between TEXT Widgets...
type: item
description: 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
creator: Peter Mason
date: 1996-06-02T07:00:00-00:00

Re: Automatic Linefeed between TEXT Widgets...
type: item
description: "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
creator: David Foster
date: 1996-06-03T07:00:00-00:00