wx.FilePickerCtrl - sample use in wx.Dialog

"Werner F. Bruhin" <[email protected]> Mon, 20 Jul 2009 15:35:35 +0200
Newsgroups gmane.comp.ide.boa-constructor.user
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------020507040700080203010806
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

k0522 had a problem with this as I can't add attachments to the 
sourceforge list I post it here.

Werner

--------------020507040700080203010806
Content-Type: text/x-python;
 name="FilePickerOnDiag.py"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="FilePickerOnDiag.py"

#Boa:Dialog:Dialog1

import wx

def create(parent):
    return Dialog1(parent)

[wxID_DIALOG1, wxID_DIALOG1DIRPICKERCTRL1, wxID_DIALOG1FILEPICKERCTRL1, 
] = [wx.NewId() for _init_ctrls in range(3)]

class Dialog1(wx.Dialog):
    def _init_coll_boxSizer1_Items(self, parent):
        # generated method, don't edit

        parent.AddWindow(self.dirPickerCtrl1, 1, border=0, flag=wx.EXPAND)
        parent.AddWindow(self.filePickerCtrl1, 1, border=0, flag=wx.EXPAND)

    def _init_sizers(self):
        # generated method, don't edit
        self.boxSizer1 = wx.BoxSizer(orient=wx.VERTICAL)

        self._init_coll_boxSizer1_Items(self.boxSizer1)

        self.SetSizer(self.boxSizer1)

    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Dialog.__init__(self, id=wxID_DIALOG1, name='', parent=prnt,
              pos=wx.Point(715, 333), size=wx.Size(627, 250),
              style=wx.MINIMIZE_BOX | wx.MAXIMIZE_BOX | wx.RESIZE_BORDER | wx.DEFAULT_DIALOG_STYLE,
              title='Dialog1')
        self.SetClientSize(wx.Size(611, 214))

        self.dirPickerCtrl1 = wx.DirPickerCtrl(id=wxID_DIALOG1DIRPICKERCTRL1,
              message='Select a folder', name='dirPickerCtrl1', parent=self,
              path='', pos=wx.Point(0, 0), size=wx.Size(611, 23),
              style=wx.DIRP_DIR_MUST_EXIST | wx.DIRP_DEFAULT_STYLE)

        self.filePickerCtrl1 = wx.FilePickerCtrl(id=wxID_DIALOG1FILEPICKERCTRL1,
              message='Select a folder', name='filePickerCtrl1', parent=self,
              path='', pos=wx.Point(0, 23), size=wx.Size(611, 23),
              style=wx.DIRP_DEFAULT_STYLE, wildcard='*.*')

        self._init_sizers()

    def __init__(self, parent):
        self._init_ctrls(parent)


if __name__ == '__main__':
    app = wx.PySimpleApp()
    dlg = create(None)
    try:
        dlg.ShowModal()
    finally:
        dlg.Destroy()
    app.MainLoop()

--------------020507040700080203010806
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
--------------020507040700080203010806
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Boa-constructor-users mailing list
Boa-constructor-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/boa-constructor-users

--------------020507040700080203010806--