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

Home » Public Forums » archive » Re: Problem with modal widgets
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Problem with modal widgets [message #8985 is a reply to message #8959] Fri, 16 May 1997 00:00 Go to previous messageGo to previous message
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
In article <337B5385.5AC8@bial1.ucsd.edu>, David Foster <foster@bial1.ucsd.edu> writes:
> This will either be a good puzzle, or a stupid question. Enough said.
>
> I want to "truly center" a modal widget in the center of the screen,
> meaning that you have to take into account the size of the widget
> itself. Prior to IDL 5.0 I could do this by:
>
> * create widget
> * unmap widget
> * realize widget
> * use WIDGET_CONTROL, wid, TLB_GET_SIZE to get the size
> of the widget, and calculate position accordingly
> * use WIDGET_CONTROL, wid, TLB_SET_[XY]OFFSET to position widget
> * map the widget

...
> And since you have to realize the widget before you can get the size
> of it, I don't see a way around this problem.

I have not looked at this specific problem, but in general you do NOT have to
realize a widget to get its size. I frequently create dummy widgets which are
never realized just to get their size, allowing me to then neatly lay out real
widgets. Does this not work for your widget?

____________________________________________________________
Mark Rivers (773) 702-2279 (office)
CARS (773) 702-9951 (secretary)
Univ. of Chicago (773) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars.uchicago.edu (e-mail)

or:
Argonne National Laboratory (630) 252-0422 (office)
Building 434A (630) 252-0405 (lab)
9700 South Cass Avenue (630) 252-1713 (beamline)
Argonne, IL 60439 (630) 252-0443 (FAX)
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: widget_control, /destroy (buttons)
Next Topic: Re: Using Errorf in IDL

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

Current Time: Sat Oct 11 07:01:15 PDT 2025

Total time taken to generate the page: 1.03889 seconds