Question

i build my GUI with wxGlade. I think it is very comfortable but i´m looking for a widget/button which open a frame to chose a directory or file..

Can u help me?

Was it helpful?

Solution

You just need to modify your button's event handler to open one of the following:

  • wx.FileDialog
  • wx.DirDialog
  • wx.lib.agw.multidirdialog

There are good examples of each of these in the wxPython demo package. See also:

OTHER TIPS

WxGlade does not directly support a adding a wx.FileDialog to your GUI. As someone answer you have to create and event linked to a button,menu,or toolbar then in your code enter the programming to open a filedialog and return text from it. What I normally do is use the toolbox button to create a generic dialog box and then name it open or save or something that will remind me that I will need to edit that piece of the wxGlade generated python code into and actual filedialog. That saves me a bit of time of typing ALL the code for a filedialog into the program.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top