| Author |
Position of a Tk dialog box
|
|
| Big Bad Dave 2006-04-02, 6:36 am |
| Hi
Does anyone know if it's possible to control where a dialog box created by a
script will appear.
I'm using Tk to create the dialog box, but it would be really nice if I
could make it appear in the middle of the screen, or in the middle of the
active document.
Thanks
| |
|
| Big Bad Dave wrote:
> Hi
> Does anyone know if it's possible to control where a dialog box
> created by a script will appear.
> I'm using Tk to create the dialog box, but it would be really
> nice if I could make it appear in the middle of the screen, or in
> the middle of the active document.
> Thanks
Do you have the PSP X Scripting API? I could not find it on Corel's
site, but here is the one for PSP 9.01 though a few things have
changed:
http://www.jasc.com/support/kb/arti...9components.asp
It will tell you that when you record and save a script using Save
Dialog Positions, the coordinates on the screen will be inserted.
After you saved a script using Save Dialog Positions, open it and
find the relevant lines (DialogPlacement). You will find what you
need in there.
But if you plan to share the script, beware that you don't know
someone else's system and workspace.
Joske
| |
|
| http://effbot.org/tkinterbook/
http://effbot.org/tkinterbook/widget.htm
The above should have all the info you need to place your dialog box.
W
"Big Bad Dave" <dave@hotmail.com> wrote in message
news:442f95c1$1_2@cnews...
> Hi
>
> Does anyone know if it's possible to control where a dialog box created by
> a script will appear.
>
> I'm using Tk to create the dialog box, but it would be really nice if I
> could make it appear in the middle of the screen, or in the middle of the
> active document.
>
> Thanks
>
>
| |
| Big Bad Dave 2006-04-03, 3:49 am |
| Thanks for the info. I'm sure that I'll crack it.
Dave
"Willy" <willy_id@hotmail.com> wrote in message news:443010de_1@cnews...
> http://effbot.org/tkinterbook/
> http://effbot.org/tkinterbook/widget.htm
>
> The above should have all the info you need to place your dialog box.
> W
> "Big Bad Dave" <dave@hotmail.com> wrote in message
> news:442f95c1$1_2@cnews...
>
>
| |
|
| Look at root geometry.
root.geometry('+300+200') starts the dialog at pos x=300 y=200
and you can dictate the size of the dialog like this.
root.geometry('200x150+300+225') means width (200) X height(150) of dialog
+300 is left starting x position and +225 is left starting y position.
W
"Big Bad Dave" <dave@hotmail.com> wrote in message
news:4430b71f$1_1@cnews...
> Thanks for the info. I'm sure that I'll crack it.
>
> Dave
>
> "Willy" <willy_id@hotmail.com> wrote in message news:443010de_1@cnews...
>
>
|
|
|
|
| Copyright 2003 - 2009 forum4designers.com Software forum Computer Hardware reviews |