|
|
Re: centering dialog_pickfile, printersetup, etc... [message #61328 is a reply to message #61231] |
Tue, 15 July 2008 07:43   |
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   |
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 #61420 is a reply to message #61326] |
Tue, 15 July 2008 12:03  |
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
|
|
|