[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
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
to accept the text, then press Accept button. Like I say, horrible.[end of
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
Mark Hadfield wrote:
> From: "Dominik Paul" <email@example.com>
> > 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?
> 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...
> If you want a quick & dirty solution you could use XDISPLAYFILE with a
> temporary file.
> Mark Hadfield
> firstname.lastname@example.org http://katipo.niwa.cri.nz/~hadfield
> National Institute for Water and Atmospheric Research
> Posted from clam.niwa.cri.nz [184.108.40.206]
> via Mailgate.ORG Server - http://www.Mailgate.ORG