[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: read input from a widget



It is a sadly lacking feature of IDL that such a tool is not included in the IDL
system.
Of course a good programmer can write his/her own, but as I have pointed out to
RSI on many ocaasions, there are some simple i/o routines which we should not
have to write,
and this is one of them.

XVAREDIT is nearest to what you want in a system-supplied routine, but the
version in idl 5.x is horrible, as it uses the unloved TableWidget.
Try the following
idl>  a=' ' & xvaredit,a & print,a

In order to enter your text you have to double click on the box, type text, then
press enter
to accept the text, then press Accept button.  Like I say, horrible.[end of
rant! ]

The version of XVAREDIT from idl 4.x is vastly more friendly.  I routinely pass
a set of numbers and text to xvaredit in a structure, edit them as required in
the nice system-supplied widget which appears with zero extra programming, then
extract the modified parameters from the structure.  If you dont have idl v.4
but want to try it, I might email you the xvaredit v4 code if rsi is not
listening.

Regards,
Michael Asten


Mark Hadfield wrote:

> From: "Dominik Paul" <dpaul@ukl.uni-freiburg.de>
> > we would like read a string from the user. But this is not possible in the
> > runtime version (its possible under unix, ok, but unfortunately not under
> > windows.
> >
> > So we are searching for a widget component to enter some text.
> >
> > Does somebody know such a component?
>
> WIDGET_TEXT.
>
> Do you know how to wrap a text widget in a routine/object to pass the
> information you want back to the caller? If not I suggest you read a good
> book on IDL programming...
>
> http://www.dfanning.com/documents/books.html
>
> If you want a quick & dirty solution you could use XDISPLAYFILE with a
> temporary file.
>
> ---
> Mark Hadfield
> m.hadfield@niwa.cri.nz  http://katipo.niwa.cri.nz/~hadfield
> National Institute for Water and Atmospheric Research
>
> --
> Posted from clam.niwa.cri.nz [202.36.29.1]
> via Mailgate.ORG Server - http://www.Mailgate.ORG