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

Home » Public Forums » archive » centering dialog_pickfile, printersetup, etc...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
centering dialog_pickfile, printersetup, etc... [message #61231] Thu, 10 July 2008 13:08 Go to next message
cgoethel is currently offline  cgoethel
Messages: 20
Registered: April 2008
Junior Member
Hello All,

Is there a way to center the dialog_pickfile or dialog_printersetup
widgets in my window? There don't seem to be any keywords in these
routines to do this.

Thanks!

Cindy
Re: centering dialog_pickfile, printersetup, etc... [message #61326 is a reply to message #61231] Tue, 15 July 2008 07:55 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
edward.s.meinel@aero.org writes:

> I got around the problem by calling Dialog_Pickfile through an empty
> parent widget. I can get it close enough to the screen center that it
> isn't too bad. I just wish the size could be specified -- I get real
> tired of resizing the dialog when folders contain long filenames...

How does that work? It doesn't seem to do anything at all for me.

base = Widget_Base()
filename = Dialog_Pickfile(DIALOG_PARENT=base)
CENTER_TLB, base

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: centering dialog_pickfile, printersetup, etc... [message #61328 is a reply to message #61231] Tue, 15 July 2008 07:43 Go to previous messageGo to next message
edward.s.meinel@aero. is currently offline  edward.s.meinel@aero.
Messages: 52
Registered: February 2005
Member
On Jul 14, 7:15 pm, David Fanning <n...@dfanning.com> wrote:
> Andrew Cool writes:
>> Interesting! The first time I invoke x=3DDialog_Pickfile() from the
>> command line, it appears in the top left
>> corner of the screen. (XP, IDL v6.4)
>
>> The second time, and subsequent times, I invoke x=3DDialog_Pickfile(),
>> it appears centered on the screen!!
>
>> Dialog_Pickfile must contain some internal smarts to do with centering
>> itself. Perhaps there is an undocumented
>> keyword to force centering on the first call?
>
> But, clearly, someone (or something) is doing the centering.
> Why can't they expose that mechanism so we can put the damn
> thing where we want it?
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

I got around the problem by calling Dialog_Pickfile through an empty
parent widget. I can get it close enough to the screen center that it
isn't too bad. I just wish the size could be specified -- I get real
tired of resizing the dialog when folders contain long filenames...

Ed
Re: centering dialog_pickfile, printersetup, etc... [message #61346 is a reply to message #61231] Mon, 14 July 2008 16:15 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Andrew Cool writes:

> Interesting! The first time I invoke x=3DDialog_Pickfile() from the
> command line, it appears in the top left
> corner of the screen. (XP, IDL v6.4)
>
> The second time, and subsequent times, I invoke x=3DDialog_Pickfile(),
> it appears centered on the screen!!
>
> Dialog_Pickfile must contain some internal smarts to do with centering
> itself. Perhaps there is an undocumented
> keyword to force centering on the first call?

But, clearly, someone (or something) is doing the centering.
Why can't they expose that mechanism so we can put the damn
thing where we want it?

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: centering dialog_pickfile, printersetup, etc... [message #61347 is a reply to message #61231] Mon, 14 July 2008 16:14 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Andrew Cool writes:

> Dialog_Pickfile must contain some internal smarts to do with centering
> itself. Perhaps there is an undocumented
> keyword to force centering on the first call?

If there is, no one has let me in on the secret. :-(

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: centering dialog_pickfile, printersetup, etc... [message #61420 is a reply to message #61326] Tue, 15 July 2008 12:03 Go to previous message
edward.s.meinel@aero. is currently offline  edward.s.meinel@aero.
Messages: 52
Registered: February 2005
Member
On Jul 15, 10:55 am, David Fanning <n...@dfanning.com> wrote:
> edward.s.mei...@aero.org writes:
>> I got around the problem by calling Dialog_Pickfile through an empty
>> parent widget. I can get it close enough to the screen center that it
>> isn't too bad. I just wish the size could be specified -- I get real
>> tired of resizing the dialog when folders contain long filenames...
>
> How does that work? It doesn't seem to do anything at all for me.
>
>   base = Widget_Base()
>   filename = Dialog_Pickfile(DIALOG_PARENT=base)
>   CENTER_TLB, base
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

First, call CENTERTLB, base instead of CENTER_TLB, base

Then, you have to center and realize the parent base before calling
DIALOG_PICKFILE:

base = Widget_Base()
CENTERTLB, base
WIDGET_CONTROL, base, /REALIZE
filename = Dialog_Pickfile(DIALOG_PARENT=base)

I tried various permutations of the widget calls, and that is the only
one that sort-of worked. I'll let one of the other Masters try and
explain why...

Ed
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Using IDL to make a signal filter
Next Topic: Re: Reset fonts / Problem with colorbuttonbitmap.pro from D. Fanning

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

Current Time: Wed Oct 08 18:39:56 PDT 2025

Total time taken to generate the page: 0.00577 seconds