wx.FileDialog for open file cannot be resizable by user

120 views
Skip to first unread message

Emre Yükselen

unread,
Jun 27, 2016, 11:31:58 AM6/27/16
to wxPython-users
wx.FileDialog for open file cannot be resizable by user.

when I create a new dialog to open a new file with fileDialog its always full screen and cannot be resizable by end user. 

I am using wxpython 3.0.2 and python 2.7

thanks

John Fabiani

unread,
Jun 27, 2016, 11:49:27 AM6/27/16
to wxpython-users
What platform?  Does the wxDemo work?  It works for me on windows 7,10 and Linux.  Maybe you need to show some code.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Emre Yükselen

unread,
Jun 28, 2016, 9:51:38 AM6/28/16
to wxPython-users
wx demo works fine but its same. When an filedialog pops up its always ullcreen with no way to resize it.
I am using this on winodows7. file dialog cannot be resized with the code below:

I use something as:
dlg = wx.FileDialog(self, "Open file", "", "", "files (*.*)|*.*", style=wx.OPEN )
dlg.Center()

if dlg.ShowModal() == wx.ID_CANCEL:
dlg.Destroy()
else:
print dlg.GetPath()

Igor Korot

unread,
Jun 28, 2016, 10:56:32 AM6/28/16
to wxpytho...@googlegroups.com
Hi, Emre,

On Tue, Jun 28, 2016 at 9:51 AM, Emre Yükselen <eyuk...@gmail.com> wrote:
> wx demo works fine but its same. When an filedialog pops up its always
> ullcreen with no way to resize it.
> I am using this on winodows7. file dialog cannot be resized with the code
> below:
>
> I use something as:
>
> dlg = wx.FileDialog(self, "Open file", "", "", "files (*.*)|*.*",
> style=wx.OPEN )
> dlg.Center()
>
> if dlg.ShowModal() == wx.ID_CANCEL:
> dlg.Destroy()
> else:
> print dlg.GetPath()

Can you try with the latest wxPython?

Thank you.

Emre Yükselen

unread,
Jun 29, 2016, 9:06:06 AM6/29/16
to wxPython-users
I am using 
wxPython3.0-win32-py2732-bit Python 2.7
can you share a code piece to set its size? I have tried a few examples I found from internet but none of them did work. 
in wxpython website I checked this is still the latest version. 

John Fabiani

unread,
Jun 29, 2016, 11:26:55 AM6/29/16
to wxpython-users
You should be able to add size = (200,200) but I doubt that's going to help.  What size is your screen?  Not that I believe that is the problem.  Although if the screen resolution is small enough I guess it could be a problem.

Looking for needles in a hay stack at this point.  If you create a frame/window can you resize it?

Try starting the app from a command prompt - maybe there is some sort of error message that will appear.

Emre Yükselen

unread,
Jun 29, 2016, 1:36:48 PM6/29/16
to wxPython-users
screen resolution is 1920x1080. I run from command line and there is no output as error, size parameter below also did not work. no error but the open file dialog is still fullscreen with no ability to resize. 
My main window can be resized, its a wx.Frame and it has all minimize maximize and close buttons. also I can resize it by dragging from borders. 

Emre Yükselen

unread,
Jun 29, 2016, 1:38:38 PM6/29/16
to wxPython-users
I just tried changing my screen resolution, I set to to a lower (1600x900) resolution. again Open file dialog is full screen.all adges are still perfectly visible but again cannot resize.

John Fabiani

unread,
Jun 29, 2016, 7:31:41 PM6/29/16
to wxpython-users
I'm sorry but I'm out of solutions.  I have used the file dialog on so many different computers over many years  - all without this issue.  I'd try re-installing everything (including python).   You are saying the demo does the same thing (full screen) so it's not your code.  I hope someone else can help!
Johnf

C M

unread,
Jun 30, 2016, 11:23:42 AM6/30/16
to wxpytho...@googlegroups.com
My guess is this has nothing to do with wxPython, but simply a preference in your Windows registry. wx.FileDialog uses the native file dialog, so it shows whatever Windows 7 would use for any application. 

This answer might explain how you might try to change your registry back to how you want it, if my guess is right.
 

David Woods

unread,
Jun 30, 2016, 11:58:05 AM6/30/16
to wxpytho...@googlegroups.com
I tried a couple of times to recreate what you describe using the wxPython Demo, python 2.7, and wxPython 3.0.2.0 without success.  Then, I double-clicked the File Dialog window header and the window maximized to full screen and I could not resize it.  Double-clicking in the window header de-maximized the window, restoring it to its original  size and allowing resizability.  Could it be that simple?

David

John Fabiani

unread,
Jun 30, 2016, 12:14:18 PM6/30/16
to wxpython-users
Wow I'm glad others got involved.  I can confirm the clicking on the window header - it works just as described.
Message has been deleted

Emre

unread,
Jul 5, 2016, 8:24:41 PM7/5/16
to wxPython-users
thanks for the double clicking idea David. I was not expecting this! It actually resized the window. (to be honest I feel embarrassed)

I don't know why it was maximized even when I tried giving specific size and position during initialize.

Any way I guess its a user setting stored in registry or somewhere to start maximized for that dialog as "Che M" suggested. 

Its up to me to find that out where that is in registry now.

thanks you guys all for the help! I was obsessed with this and now I can continue!

Emre
Reply all
Reply to author
Forward
0 new messages