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

Home » Public Forums » archive » Putting the cursor in a field
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
Putting the cursor in a field [message #5520] Tue, 16 January 1996 00:00 Go to next message
mbrown is currently offline  mbrown
Messages: 15
Registered: August 1995
Junior Member
Hi. I'm looking for a way to display the cursor inside
a field when the field is displayed. I'm using CW_FIELD
to create the field. The user has to place the cursor
inside the field by clicking the mouse button inside the
field. It would be nice if he didn't have to. This seems
like an easy thing to do; I just can't find out how. Could
someone help me?

Myron.

-----------------------------
Myron Brown
mbrown@olie.wvitcoe.wvnet.edu
Re: Putting the cursor in a field [message #5624 is a reply to message #5520] Fri, 19 January 1996 00:00 Go to previous messageGo to next message
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
In article <4dldpd$39g@n.ruf.uni-freiburg.de>, ps@kis.uni-freiburg.de (Peter Suetterlin) writes:
|>
|> In article <4dif86$t7q@ratatosk.uio.no>,
|> steinhh@amon.uio.no (Stein Vidar Hagfors Haugan) writes:
|> >
|> >In article <19960116.172716.831183.NETNEWS@WVNVM.WVNET.EDU>,
|> mbrown@olie.wvitcoe.wvnet.edu (Myron Brown) writes:
|> >|>
|> >|> Hi. I'm looking for a way to display the cursor inside
|> >|> a field when the field is displayed. I'm using CW_FIELD
|> >|> to create the field. The user has to place the cursor
|> >|> inside the field by clicking the mouse button inside the
|> >|> field. It would be nice if he didn't have to. This seems
|> >|> like an easy thing to do; I just can't find out how. Could
|> >|> someone help me?
|> >|>
|> >
|> >Using WIDGET_CONTROL,TEXT_WIDGET_ID,/INPUT_FOCUS sets the
|> >keyboard input focus to the specified text widget (same
|> >effect as clicking inside the field).
|>
|> I'm afraid that is only half the truth. The question - as I
|> understood - was to place the mouse-cursor at a specified position.
|> It is possible (as can be seen e.g. in widget_message) But I never
|> found out how it is done :-( So I'd also like to know.
|>

Yes, that's possible too! I just discovered it myself a couple of
days ago.

The TVCRS procedure can be used to move the mouse cursor anywhere,
even outside the (possibly unmapped) currently selected draw window.

The following example should demonstrate this:

base = widget_base(/row)
text = widget_text(base,xsize=100)
dummy= widget_base(base,map=0)
draw = widget_draw(dummy,xsize=1,ysize=1)
widget_control,base,/realize
widget_control,draw,get_value=window
wset,window
tvcrs,-200,-20,/device
widget_control,text,/input_focus

You just have to match the X,Y device coordinates to where you want the
mouse cursor to appear.

Regards,

Stein Vidar
Re: Putting the cursor in a field [message #5640 is a reply to message #5520] Thu, 18 January 1996 00:00 Go to previous messageGo to next message
ps is currently offline  ps
Messages: 14
Registered: September 1994
Junior Member
In article <4dif86$t7q@ratatosk.uio.no>,
steinhh@amon.uio.no (Stein Vidar Hagfors Haugan) writes:
>
> In article <19960116.172716.831183.NETNEWS@WVNVM.WVNET.EDU>,
mbrown@olie.wvitcoe.wvnet.edu (Myron Brown) writes:
> |>
> |> Hi. I'm looking for a way to display the cursor inside
> |> a field when the field is displayed. I'm using CW_FIELD
> |> to create the field. The user has to place the cursor
> |> inside the field by clicking the mouse button inside the
> |> field. It would be nice if he didn't have to. This seems
> |> like an easy thing to do; I just can't find out how. Could
> |> someone help me?
> |>
>
> Using WIDGET_CONTROL,TEXT_WIDGET_ID,/INPUT_FOCUS sets the
> keyboard input focus to the specified text widget (same
> effect as clicking inside the field).

I'm afraid that is only half the truth. The question - as I
understood - was to place the mouse-cursor at a specified position.
It is possible (as can be seen e.g. in widget_message) But I never
found out how it is done :-( So I'd also like to know.

Peter


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
Peter "Pit" Suetterlin http://www.kis.uni-freiburg.de/~ps
Kiepenheuer Institut fuer Sonnenphysik
Tel.: +49 761 3198-210 ps@kis.uni-freiburg.de
-- * -- * ...-- * -- * ...-- * -- * ...-- * -- * ...-- * -- * ...-- * --
Come and see the stars! http://www.kis.uni-freiburg.de/~ps/SFB
Sternfreunde Breisgau e.V.
Tel.: +49 761 73571 or 278588
____________________________________________________________ ______________
Re: Putting the cursor in a field [message #5692 is a reply to message #5520] Wed, 24 January 1996 00:00 Go to previous message
ps is currently offline  ps
Messages: 14
Registered: September 1994
Junior Member
In article <4do4ab$ndt@ratatosk.uio.no>,
steinhh@amon.uio.no (Stein Vidar Hagfors Haugan) writes:

> The TVCRS procedure can be used to move the mouse cursor anywhere,
> even outside the (possibly unmapped) currently selected draw window.
>
> The following example should demonstrate this:
>
> base = widget_base(/row)
> text = widget_text(base,xsize=100)
> dummy= widget_base(base,map=0)
> draw = widget_draw(dummy,xsize=1,ysize=1)
> widget_control,base,/realize
> widget_control,draw,get_value=window
> wset,window
> tvcrs,-200,-20,/device
> widget_control,text,/input_focus
>
> You just have to match the X,Y device coordinates to where you want the
> mouse cursor to appear.

Uuh, oh, that's a *very* dirty trick. However, I'll give it a try.
Thanks for the suggestion.

Peter


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
Peter "Pit" Suetterlin http://www.kis.uni-freiburg.de/~ps
Kiepenheuer Institut fuer Sonnenphysik
Tel.: +49 761 3198-210 ps@kis.uni-freiburg.de
-- * -- * ...-- * -- * ...-- * -- * ...-- * -- * ...-- * -- * ...-- * --
Come and see the stars! http://www.kis.uni-freiburg.de/~ps/SFB
Sternfreunde Breisgau e.V.
Tel.: +49 761 73571 or 278588
____________________________________________________________ ______________
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Routine to read files in pdb-format?
Next Topic: Postscript for different paper sizes

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

Current Time: Wed Oct 08 13:51:55 PDT 2025

Total time taken to generate the page: 0.00657 seconds