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

Home » Public Forums » archive » Re: WIDGET_MESSAGE question
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: WIDGET_MESSAGE question [message #11411 is a reply to message #11410] Tue, 07 April 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Dan Peduzzi (peduzzi@ll.mit.edu) writes:

> I would like to center a dialog on the display using
>
> result = WIDGET_MESSAGE('error message',/ERROR)
>
> The manuals indicate that I can specify a "dialog parent" widget
> over which to position the dialog, but I don't have any other
> widgets currently realized.
>
> Is there a simple way to control the placement of such a
> dialog, without creating additional "temporary" widgets?

This kind of thing is quite simple to write yourself. In my
widget programming courses it doesn't take more than a half
hour, even with people who have never written a modal dialog
widget.

Use the Device command with the Get_Screen_Size keyword
to get the size of your display. Find out the size of your
widget with the Widget_Info command and the Geometry keyword,
then use the offset keywords to position your dialog in the
center of the display. Use a pointer to "store" the answer
for return after the dialog has been destroyed.

Details can be found in my book or by examining the code
available on my web page. See, for example, the GetData
program:

ftp://ftp.dfanning.com/pub/dfanning/outgoing/coyote/getdata. pro

Cheers,

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Previous Topic: Re: bug in idl5.03
Next Topic: WIDGET_MESSAGE question

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

Current Time: Sun Oct 12 02:14:38 PDT 2025

Total time taken to generate the page: 1.59813 seconds