|
Re: Can't position modal compound widget (such as cw_form) [message #14736 is a reply to message #14688] |
Thu, 25 March 1999 00:00  |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
Massimo Grion wrote:
>
> Using cw_form as a modal dialog, the widget always places itself on the
> top left corner of the screen. Is there a way to center it, without
> using cw_form inside an other widget?
> I am using IDL 5.2, on VMS.
>
> Thank you,
> M. Grion
Massimo -
You can use my POS_WIDGET.PRO routine to position a widget at:
(1) the center of the screen; (2) centered within a parent widget;
(3) to the right of a parent widget; or (4) "cascaded" relative
to a parent widget, offset in X and Y by a small amount. You can
call this before or after a widget has been realized.
You'll need to add a line like this inside a local copy of CW_FORM():
ret = POS_WIDGET(base)
to center the widget onscreen.
You can get POS_WIDGET.PRO at:
ftp://bial8.ucsd.edu/pub/software/idl/share
Dave
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
|
|
|