tkFileDialog.askdirectory() not resizable in Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

tkFileDialog.askdirectory() not resizable in Windows

Lynn Oliver
Using Python versions 2.6.6 or 2.7.1, the tkFileDialog.askdirectory() dialog box is resizable in OS X but not on WinXP or Win7.  tkFileDialog.askopenfilename() is resizable in both environments.

Is there a way to work around this?

Lynn
_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
Reply | Threaded
Open this post in threaded view
|

Re: tkFileDialog.askdirectory() not resizable in Windows

Michael Lange
Hi Lynn,

Thus spoketh Lynn Oliver <[hidden email]>
unto us on Tue, 12 Jul 2011 12:34:21 -0700:

> Using Python versions 2.6.6 or 2.7.1, the tkFileDialog.askdirectory()
> dialog box is resizable in OS X but not on WinXP or Win7.
> tkFileDialog.askopenfilename() is resizable in both environments.
>
> Is there a way to work around this?
>

I think on windows tk uses native dialogs, so I don't think there is a
way to change this.

Regards

Michael



.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

A father doesn't destroy his children.
                -- Lt. Carolyn Palamas, "Who Mourns for Adonais?",
                   stardate 3468.1.
_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
Reply | Threaded
Open this post in threaded view
|

Re: tkFileDialog.askdirectory() not resizable in Windows

Lynn Oliver
Hi Michael,

On windows if you set BIF_USENEWUI (0x0040) when calling SHBrowseForFolder() it will use the resizable dialog box.

-Lynn

On Jul 15, 2011, at 10:36 AM, Michael Lange wrote:

> Hi Lynn,
>
> Thus spoketh Lynn Oliver <[hidden email]>
> unto us on Tue, 12 Jul 2011 12:34:21 -0700:
>
>> Using Python versions 2.6.6 or 2.7.1, the tkFileDialog.askdirectory()
>> dialog box is resizable in OS X but not on WinXP or Win7.
>> tkFileDialog.askopenfilename() is resizable in both environments.
>>
>> Is there a way to work around this?
>>
>
> I think on windows tk uses native dialogs, so I don't think there is a
> way to change this.
>
> Regards
>
> Michael
>
>
>
> .-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.
>
> A father doesn't destroy his children.
> -- Lt. Carolyn Palamas, "Who Mourns for Adonais?",
>   stardate 3468.1.
> _______________________________________________
> Tkinter-discuss mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/tkinter-discuss

_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
Reply | Threaded
Open this post in threaded view
|

Re: tkFileDialog.askdirectory() not resizable in Windows

Michael Lange
Hi Lynn,

Thus spoketh Lynn Oliver <[hidden email]>
unto us on Fri, 15 Jul 2011 10:53:49 -0700:

> Hi Michael,
>
> On windows if you set BIF_USENEWUI (0x0040) when calling
> SHBrowseForFolder() it will use the resizable dialog box.

Oh, I am afraid I don't know anything about this :(
Seems like it is something tk doesn't do by default though.
A quick web search showed up this result:

http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/dbbbea1cb1ebb693/660b4ea4b471dce0?lnk=gst&q=BIF_USENEWUI+#660b4ea4b471dce0

So it seems like this is something that must be compiled into tcl / tk .

>From reading this thread the good news seem to be that latest tk releases
seem to already do this, so if you can get a recent tcl/tk working with
your python install there may be hope for you ;)

Regards

Michael



.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

There's a way out of any cage.
                -- Captain Christopher Pike, "The Menagerie" ("The Cage"),
                   stardate unknown.
_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
Reply | Threaded
Open this post in threaded view
|

Re: tkFileDialog.askdirectory() not resizable in Windows

Lynn Oliver
Thanks for finding that thread.  Reading the release notes, it seems that this change went into 8.5.8, but even building with 8.5.10 I don't see the change on either WinXP or Win7.

Lynn


> Hi Lynn,
>
> Thus spoketh Lynn Oliver <[hidden email]>
> unto us on Fri, 15 Jul 2011 10:53:49 -0700:
>
>> Hi Michael,
>>
>> On windows if you set BIF_USENEWUI (0x0040) when calling
>> SHBrowseForFolder() it will use the resizable dialog box.
>
> Oh, I am afraid I don't know anything about this :(
> Seems like it is something tk doesn't do by default though.
> A quick web search showed up this result:
>
> http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/dbbbea1cb1ebb693/660b4ea4b471dce0?lnk=gst&q=BIF_USENEWUI+#660b4ea4b471dce0
>
> So it seems like this is something that must be compiled into tcl / tk .
>
>> From reading this thread the good news seem to be that latest tk releases
> seem to already do this, so if you can get a recent tcl/tk working with
> your python install there may be hope for you ;)
>
> Regards
>
> Michael
>
>
>
> .-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.
>
> There's a way out of any cage.
> -- Captain Christopher Pike, "The Menagerie" ("The Cage"),
>   stardate unknown.
> _______________________________________________
> Tkinter-discuss mailing list
> [hidden email]
> http://mail.python.org/mailman/listinfo/tkinter-discuss

_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
Reply | Threaded
Open this post in threaded view
|

Re: tkFileDialog.askdirectory() not resizable in Windows

Michael Lange
Hi Lynn,

Thus spoketh Lynn Oliver <[hidden email]>
unto us on Fri, 15 Jul 2011 13:24:14 -0700:

> Thanks for finding that thread.  Reading the release notes, it seems
> that this change went into 8.5.8, but even building with 8.5.10 I don't
> see the change on either WinXP or Win7.

Ok, so I did some further investigation ;)

The patch as suggested in the comp.lang.tcl thread suggests to change the
lines

    bInfo.ulFlags = BIF_EDITBOX | BIF_STATUSTEXT | BIF_RETURNFSANCESTORS
            | BIF_VALIDATE;

in tkWinDialog.c into

    bInfo.ulFlags = BIF_EDITBOX | BIF_STATUSTEXT | BIF_RETURNFSANCESTORS
            | BIF_VALIDATE | BIF_USENEWUI;

Now I tried and downloaded the sources of both tk-8.5.6 and tk-8.5.10 and
compared the relevant sections of tkWinDialog.c . In 8.5.6 I found, as
expeceted, the first version of these lines.

Now the change they made in 8.5.10 actually looks like:

    bInfo.ulFlags = BIF_EDITBOX | BIF_STATUSTEXT | BIF_RETURNFSANCESTORS
        | BIF_VALIDATE | BIF_NEWDIALOGSTYLE;

So I guess that maybe winxp needs  BIF_USENEWUI instead, just as you and
Jeff on c.l.t. suggested? I don't know anything about this, so I can just
guess that  BIF_NEWDIALOGSTYLE might work for win7 but not for winxp ?

So I suggest that, if possible, you might change this line in the sources,
recompile tk and in case it works file a bug report to the tk developers.

Regards

Michael


.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

Humans do claim a great deal for that particular emotion (love).
                -- Spock, "The Lights of Zetar", stardate 5725.6
_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
Reply | Threaded
Open this post in threaded view
|

Re: tkFileDialog.askdirectory() not resizable in Windows

Lynn Oliver
In reply to this post by Lynn Oliver
t turns out that the problem was an outdated version of init.tcl that was (still?) present after installing ActivePython 2.7.2.5.  After replacing that file with the one from the 8.5.9 source
it is now working properly.

Lynn
On Jul 12, 2011, at 12:34 PM, Lynn Oliver wrote:

> Using Python versions 2.6.6 or 2.7.1, the tkFileDialog.askdirectory() dialog box is resizable in OS X but not on WinXP or Win7.  tkFileDialog.askopenfilename() is resizable in both environments.
>
> Is there a way to

_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss