Python wx 模块,RESIZE_BORDER 实例源码

我们从Python开源项目中,提取了以下34个代码示例,用于说明如何使用wx.RESIZE_BORDER

项目:pyvmwareclient    作者:wbugbofh    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: Dialog_snapshot.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER
        wx.Dialog.__init__(self, *args, **kwds)
        self.label_1 = wx.StaticText(self, wx.ID_ANY, "Nombre:")
        self.nombre_snap = wx.TextCtrl(self, wx.ID_ANY, "")
        self.label_2 = wx.StaticText(self, wx.ID_ANY, u"Descripci\u00f3n:")
        self.descripcion_snap = wx.TextCtrl(self, wx.ID_ANY, "")
        self.checkbox_memory = wx.CheckBox(self, wx.ID_ANY, "memory")
        self.checkbox_quiesce = wx.CheckBox(self, wx.ID_ANY, "quiesce")
        self.snap_ok = wx.Button(self, wx.ID_OK, "OK")
        self.snap_cancel = wx.Button(self, wx.ID_CANCEL, "Cancel")

        self.__set_properties()
        self.__do_layout()
        # end wxGlade
项目:python_2048    作者:OATOMO    | 项目源码 | 文件源码
def __init__(self,title):
        super(Frame,self).__init__(None,-1,title,style=wx.DEFAULT_FRAME_STYLE^wx.MAXIMIZE_BOX^wx.RESIZE_BORDER)
        self.colors = {0:(204,192,179),2:(238, 228, 218),4:(237, 224, 200),8:(242, 177, 121),16:(245, 149, 99),32:(246, 124, 95),64:(246, 94, 59),128:(237, 207, 114),256:(237, 207, 114),512:(237, 207, 114),1024:(237, 207, 114),2048:(237, 207, 114),4096:(237, 207, 114),8192:(237, 207, 114),16384:(237, 207, 114),32768:(237, 207, 114),65536:(237, 207, 114),131072:(237, 207, 114),262144:(237, 207, 114),524288:(237, 207, 114),1048576:(237, 207, 114),2097152:(237, 207, 114),4194304:(237, 207, 114),8388608:(237, 207, 114),16777216:(237, 207, 114)}#?????????

        self.setIcon()
        self.initGame()
        self.initBuffer()

        panel = wx.Panel(self)  #??????
        #------????
        panel.Bind(wx.EVT_KEY_DOWN,self.onKeyDown)
        panel.SetFocus() #?????
        self.Bind(wx.EVT_SIZE,self.onSize) #use wx.BufferedPaintDC
        self.Bind(wx.EVT_PAINT,self.onPaint)
        self.Bind(wx.EVT_CLOSE,self.onClose) #????
        #------

        self.SetClientSize((505,720)) #??????
        self.Center() #?????
        self.Show()
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent, info):
        wx.Dialog.__init__(self, parent, title=_("License"), size=(500, 400),
                           style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)

        if parent and parent.GetIcon():
            self.SetIcon(parent.GetIcon())

        self.SetMinSize((400, 300))
        close = wx.Button(self, id=wx.ID_CLOSE, label=_("&Close"))

        ctrl = wx.TextCtrl(self, style=wx.TE_READONLY | wx.TE_MULTILINE)
        ctrl.SetValue(info.License)

        btnSizer = wx.BoxSizer(wx.HORIZONTAL)
        btnSizer.Add(close)

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(ctrl, 1, wx.EXPAND | wx.ALL, 10)
        sizer.Add(btnSizer, flag=wx.ALIGN_RIGHT | wx.RIGHT | wx.BOTTOM, border=10)
        self.SetSizer(sizer)
        self.Layout()
        self.Show()
        self.SetEscapeId(close.GetId())

        close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy())
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: sms_dialoge.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.THICK_FRAME
        wx.Frame.__init__(self, *args, **kwds)
        self.panel_5 = wx.Panel(self, wx.ID_ANY)
        self.label_7 = wx.StaticText(self.panel_5, wx.ID_ANY, ("Username"))
        self.combo_box_1 = wx.ComboBox(self.panel_5, wx.ID_ANY, choices=[("Select"), ("admin"), ("teacher")], style=wx.CB_READONLY|wx.CB_DROPDOWN)
        self.label_8 = wx.StaticText(self.panel_5, wx.ID_ANY, ("Password"))
        self.text_ctrl_1 = wx.TextCtrl(self.panel_5, wx.ID_ANY, "", style=wx.TE_PASSWORD)
        self.button_1 = wx.Button(self.panel_5, wx.ID_ANY, ("Cancel"))
        self.button_2 = wx.Button(self.panel_5, wx.ID_ANY, ("Login"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_COMBOBOX, self.on_user, self.combo_box_1)
        self.Bind(wx.EVT_TEXT, self.on_text, self.text_ctrl_1)
        self.Bind(wx.EVT_BUTTON, self.on_cancel, self.button_1)
        self.Bind(wx.EVT_BUTTON, self.on_login, self.button_2)

        self.text_ctrl_1.Bind(wx.EVT_KEY_DOWN, self.OnKeyPress)
        self.Bind(wx.EVT_CLOSE,self.on_close,self)
        self.UO=user_operations(self)
        # end wxGlade
项目:Daily-code    作者:rui7157    | 项目源码 | 文件源码
def __init__(self):
        frame = wx.Frame.__init__(self, None, -1, u"????", pos=(200, 300), size=(300, 150), style=wx.MINIMIZE_BOX |
                                  wx.RESIZE_BORDER | wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX | wx.CLIP_CHILDREN)
        self.panel = wx.Panel(self)
        sizer = wx.BoxSizer(wx.VERTICAL)
        self.labelResult = wx.StaticText(
            self.panel, -1, u"????/??????", size=(300, 150),style=wx.ALIGN_CENTER)
        sizer.Add(self.labelResult, wx.EXPAND)
        self.panel.SetSizer(sizer)
        self.labelResult.SetDropTarget(OnDropFile(self.labelResult))
项目:FestEngine    作者:Himura2la    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Dialog.__init__(self, parent, title="FestEngine Log", style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
        main_sizer = wx.BoxSizer(wx.VERTICAL)

        self.text_ctrl = wx.TextCtrl(self, style=wx.TE_READONLY | wx.TE_MULTILINE)
        main_sizer.Add(self.text_ctrl, 1, wx.EXPAND)

        self.pending_messages = list()
        self.timer = wx.Timer()
        self.timer.Bind(wx.EVT_TIMER, self.append_pending_messages)
        self.timer.Start(500)
        self.SetSizer(main_sizer)
项目:MaTags    作者:hastelloy    | 项目源码 | 文件源码
def __init__(self, parent, title):
        style = wx.DEFAULT_FRAME_STYLE & ~(
            wx.RESIZE_BORDER | wx.MAXIMIZE_BOX |
            wx.MINIMIZE_BOX|wx.CLOSE_BOX)

        wx.Frame.__init__(self, parent, title=title, 
            style=style, size=(400,60))
        self.textbox = wx.TextCtrl(self)

        img = wx.Image("matags.png", wx.BITMAP_TYPE_ANY)
        bmp = wx.Bitmap(img)
        self.icon = wx.Icon()
        self.icon.CopyFromBitmap(bmp)
        self.SetIcon(self.icon)

        self.tbIcon = wx.adv.TaskBarIcon()
        self.tbIcon.SetIcon(self.icon)

        self.Show(True)
        self.Centre()

        self.reg_hot_keys()        
        self.Bind(wx.EVT_HOTKEY, self.on_extract_tag, 
            id=self.hotkeys['extract_tag'][0])
        self.Bind(wx.EVT_HOTKEY, self.on_close, 
            id=self.hotkeys['quit'][0])
        self.Bind(wx.EVT_HOTKEY, self.on_activate, 
            id=self.hotkeys['activate'][0])
        self.Bind(wx.EVT_HOTKEY, self.on_refresh, 
            id=self.hotkeys['refresh'][0])
        self.textbox.Bind(wx.EVT_CHAR, self.check_key)
        # do not use EVT_KEY_DOWN, 
        # it becomes difficult to get lower case
        # self.textbox.Bind(wx.EVT_KEY_DOWN, self.check_key)
        # self.Bind(wx.EVT_CLOSE, self.on_close)
        self.Bind(wx.EVT_ICONIZE, self.on_iconify)
        self.matags = MaTags()
        # try:
        # except Exception as e:
        #     self.textbox.ChangeValue(e.args[0].decode('utf8', 'ignore'))
        #     self.textbox.Disable()
项目:pyvmwareclient    作者:wbugbofh    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: Dialogo_texto.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX | wx.RESIZE_BORDER
        wx.Dialog.__init__(self, *args, **kwds)
        self.salida_texto = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB)
        self.bnt_salida_ok = wx.Button(self, wx.ID_OK, "OK", style=wx.BU_BOTTOM)
        self.sizer_1_staticbox = wx.StaticBox(self, wx.ID_ANY, "Information")

        self.__set_properties()
        self.__do_layout()
        # end wxGlade
项目:pyvmwareclient    作者:wbugbofh    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: Dialogo_user_pass.__init__
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER
        wx.Dialog.__init__(self, *args, **kwds)
        self.label_3 = wx.StaticText(self, wx.ID_ANY, "Usuario:")
        self.usuario = wx.TextCtrl(self, wx.ID_ANY, "")
        self.label_4 = wx.StaticText(self, wx.ID_ANY, "Password:")
        self.password = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_PASSWORD)
        self.button_OK = wx.Button(self, wx.ID_OK, "OK")
        self.button_cancel = wx.Button(self, wx.ID_CANCEL, "Cancel")

        self.__set_properties()
        self.__do_layout()
        # end wxGlade
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __init__(self, parent, subpanel):
        wx.Dialog.__init__(self, parent, title="Calculate Q-vector", size=(300, 180),style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER)
        self.subpanel = subpanel
        vbox = wx.BoxSizer(wx.VERTICAL)
        self.ttheta = NumberObject(self,"2 theta:",self.subpanel.ttheta,80)
        self.ttheta.label.SetToolTipNew("2 theta angle (radians). "+os.linesep+"Note: Diffraction pattern is assumed "+os.linesep+"to be co-ordinate corrected.")
        self.phi = NumberObject(self,"phi:",self.subpanel.phi,80)
        self.phi.label.SetToolTipNew("phi angle (radians). "+os.linesep+"Note: Diffraction pattern is assumed "+os.linesep+"to be co-ordinate corrected.")
        self.waveln = NumberObject(self,"lambda:",self.subpanel.waveln,80)
        self.waveln.label.SetToolTipNew("wavelength (nanometers),")
        vbox.Add(self.ttheta ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add(self.phi ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add(self.waveln ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.rb = RadioBoxNew(self, label="Coordinate system", choices=['Global','Detector'],  majorDimension=2, style=wx.RA_SPECIFY_COLS)
        self.rb.SetToolTipNew("Select co-ordinate system for Q-vector. "+os.linesep+"If the Diffraction data is co-ordinate corrected,"+os.linesep+"the global system is appropriate."+os.linesep+"If not, the detector system should be used."+os.linesep+"(i.e. normal to the reflected wave.)")
        vbox.Add(self.rb ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        vbox.Add((-1,10))
        hbox = wx.BoxSizer(wx.HORIZONTAL)
        self.ok = wx.Button(self, label='Ok', size=(70, 30))
        self.cancel = wx.Button(self, label='Cancel', size=(70, 30))
        hbox.Add(self.ok, 1,flag=wx.EXPAND)
        hbox.Add(self.cancel, 1, flag=wx.EXPAND)
        vbox.Add(hbox ,0, flag=wx.EXPAND|wx.LEFT|wx.RIGHT|wx.TOP, border=2)
        self.SetSizer(vbox)
        self.ok.Bind(wx.EVT_BUTTON, self.OnOk)
        self.cancel.Bind(wx.EVT_BUTTON, self.OnCancel)
        self.Fit()
        self.Layout()
        self.Show()
项目:magic-card-database    作者:drknotter    | 项目源码 | 文件源码
def __init__(self, parent=None):
        wx.Frame.__init__(self,parent,style=wx.DEFAULT_FRAME_STYLE | wx.RESIZE_BORDER) 

        self.init_db()
        self.init_ui()

        self.SetTitle('Card Viewer')
        #self.SetClientSize((-1,311))
        self.Fit()
        self.Centre()
        self.Show(True)
项目:pyjam    作者:10se1ucgo    | 项目源码 | 文件源码
def __init__(self, parent, file):
        super(WaveformPlot, self).__init__(parent=parent, title="pyjam Waveform Viewer",
                                           style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)

        self.file = file

        self.plot = plot.PlotCanvas(self)
        self.plot.canvas.Bind(wx.EVT_LEFT_DOWN, self.lmb_down)
        self.plot.canvas.Bind(wx.EVT_LEFT_UP, self.lmb_up)
        self.plot.canvas.Bind(wx.EVT_MOTION, self.mouse_motion)
        self.plot.EnableAxesValues = (True, False, False, False)
        self.plot.EnableGrid = (True, False)
        self.plot.AbsScale = (True, False)
        self.plot.EnableAntiAliasing = True

        self.panel = WaveformPanel(self)

        sizer = wx.BoxSizer(wx.HORIZONTAL)
        sizer.Add(self.plot, 1, wx.EXPAND, 0)
        sizer.Add(self.panel, 0, wx.EXPAND, 0)
        self.SetSizerAndFit(sizer)
        self.SetSize(800, self.GetSize()[1])
        self.SetMinSize(self.GetSize())

        self.player = wx.media.MediaCtrl(parent=self, style=wx.SIMPLE_BORDER)

        self.volume = 25
        self.selected = np.array([0.0, 0.0])
        self.maximum = 0.0
        self.minimum = 0.0
        self.selection_drawn = False
        self.resized = False

        self.timer = wx.Timer(self)

        self.Bind(wx.EVT_SIZE, self.on_size)
        self.Bind(wx.EVT_TIMER, self.on_timer)
        self.Bind(wx.EVT_IDLE, self.on_idle)
        self.Bind(wx.EVT_CLOSE, self.on_exit)

        self.load()
项目:wpkg-gp-client    作者:sonicnkt    | 项目源码 | 文件源码
def __init__(self, title='Temp', log="Temp"):
        """Constructor"""
        wx.Dialog.__init__(self, None, title=title, style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
        self.log = "\n".join(log)
        self.InitUI()
        self.SetSize((640, 480))
项目:wpkg-gp-client    作者:sonicnkt    | 项目源码 | 文件源码
def __init__(self, title='Temp', log="Temp"):
        """Constructor"""
        wx.Dialog.__init__(self, None, title=title, style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
        self.log = "\n".join(log)
        self.InitUI()
        self.SetSize((640, 480))
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent, name, library, default=None):
        wx.Dialog.__init__(self,
                           name='BrowseValueDialog', parent=parent,
                           style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER,
                           title=_('Browse %s values library') % name)

        self.staticText1 = wx.StaticText(
              label=_('Choose a value for %s:') % name, name='staticText1', parent=self,
              pos=wx.Point(0, 0), size=wx.DefaultSize, style=0)

        self.ValuesLibrary = wx.TreeCtrl(
              name='ValuesLibrary', parent=self, pos=wx.Point(0, 0),
              size=wx.Size(400, 200), style=wx.TR_HAS_BUTTONS | wx.TR_SINGLE | wx.SUNKEN_BORDER | wx.TR_HIDE_ROOT | wx.TR_LINES_AT_ROOT)

        self.ButtonSizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)

        self.Bind(wx.EVT_BUTTON, self.OnOK, id=self.ButtonSizer.GetAffirmativeButton().GetId())

        self.flexGridSizer1 = wx.FlexGridSizer(cols=1, hgap=0, rows=3, vgap=10)

        self.flexGridSizer1.AddWindow(self.staticText1,   0, border=20, flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)
        self.flexGridSizer1.AddWindow(self.ValuesLibrary, 0, border=20, flag=wx.GROW | wx.LEFT | wx.RIGHT)
        self.flexGridSizer1.AddSizer(self.ButtonSizer,    0, border=20, flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)

        self.flexGridSizer1.AddGrowableCol(0)
        self.flexGridSizer1.AddGrowableRow(1)

        self.SetSizer(self.flexGridSizer1)
        self.Fit()

        root = self.ValuesLibrary.AddRoot("")
        self.GenerateValuesLibraryBranch(root, library, default)
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent, info):
        wx.Dialog.__init__(self, parent, title=_("Credits"), size=(475, 320),
                           style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)

        if parent and parent.GetIcon():
            self.SetIcon(parent.GetIcon())

        self.SetMinSize((300, 200))
        notebook = wx.Notebook(self)
        close = wx.Button(self, id=wx.ID_CLOSE, label=_("&Close"))
        close.SetDefault()

        developer = wx.TextCtrl(notebook, style=wx.TE_READONLY | wx.TE_MULTILINE)
        translators = wx.TextCtrl(notebook, style=wx.TE_READONLY | wx.TE_MULTILINE)

        developer.SetValue(u'\n'.join(info.Developers))
        translators.SetValue(u'\n'.join(info.Translators))

        notebook.AddPage(developer, text=_("Written by"))
        notebook.AddPage(translators, text=_("Translated by"))

        btnSizer = wx.BoxSizer(wx.HORIZONTAL)
        btnSizer.Add(close)

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(notebook, 1, wx.EXPAND | wx.ALL, 10)
        sizer.Add(btnSizer, flag=wx.ALIGN_RIGHT | wx.RIGHT | wx.BOTTOM, border=10)
        self.SetSizer(sizer)
        self.Layout()
        self.Show()
        self.SetEscapeId(close.GetId())

        close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy())
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: sampoorna_win.__init__
        kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX | wx.MAXIMIZE | wx.MAXIMIZE_BOX | wx.STAY_ON_TOP | wx.SYSTEM_MENU | wx.RESIZE_BORDER | wx.CLIP_CHILDREN
        wx.Frame.__init__(self, *args, **kwds)
        self.panel_1 = wx.ScrolledWindow(self, wx.ID_ANY, style=wx.TAB_TRAVERSAL)
        self.panel_warning = wx.Panel(self.panel_1, wx.ID_ANY, style=wx.RAISED_BORDER | wx.STATIC_BORDER | wx.TAB_TRAVERSAL)
        self.label_1 = wx.StaticText(self.panel_warning, wx.ID_ANY, _("label_1"))
        self.panel_login = wx.Panel(self.panel_1, wx.ID_ANY)
        self.bitmap_1 = wx.StaticBitmap(self.panel_login, wx.ID_ANY, wx.Bitmap("/home/ghssvythiri/Desktop/about.jpeg", wx.BITMAP_TYPE_ANY))
        self.label_2 = wx.StaticText(self.panel_login, wx.ID_ANY, _("label_2"))
        self.text_ctrl_1 = wx.TextCtrl(self.panel_login, wx.ID_ANY, "")
        self.label_3 = wx.StaticText(self.panel_login, wx.ID_ANY, _("label_3"))
        self.text_ctrl_2 = wx.TextCtrl(self.panel_login, wx.ID_ANY, "", style=wx.TE_PASSWORD)
        self.button_1 = wx.Button(self.panel_login, wx.ID_ANY, _("button_1"))
        self.panel_class = wx.Panel(self.panel_1, wx.ID_ANY)
        self.checkbox_1 = wx.CheckBox(self.panel_class, wx.ID_ANY, _("checkbox_1"))
        self.checkbox_2 = wx.CheckBox(self.panel_class, wx.ID_ANY, _("checkbox_2"))
        self.checkbox_3 = wx.CheckBox(self.panel_class, wx.ID_ANY, _("checkbox_3"))
        self.button_2 = wx.Button(self.panel_class, wx.ID_ANY, _("button_2"))
        self.panel_progress = wx.Panel(self.panel_1, wx.ID_ANY)
        self.panel_report = wx.Panel(self.panel_1, wx.ID_ANY)

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.on_next, self.button_2)
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: institution.__init__
        kwds["style"] = wx.CAPTION | wx.RESIZE_BORDER |wx.MINIMIZE_BOX| wx.CLOSE_BOX | wx.MAXIMIZE_BOX | wx.THICK_FRAME|wx.CAPTION | wx.MAXIMIZE| wx.MINIMIZE_BOX
        wx.Dialog.__init__(self, *args, **kwds)
        self.label_1 = wx.StaticText(self, wx.ID_ANY, ("Institution Details"))
        self.label_2 = wx.StaticText(self, wx.ID_ANY, ("School Name"))
        self.text_ctrl_name = wx.TextCtrl(self, wx.ID_ANY, "")
        self.label_3 = wx.StaticText(self, wx.ID_ANY, ("School Code"))
        self.text_ctrl_code = wx.TextCtrl(self, wx.ID_ANY, "")
        self.label_4 = wx.StaticText(self, wx.ID_ANY, ("Email"))
        self.text_ctrl_email = wx.TextCtrl(self, wx.ID_ANY, "")
        self.label_5 = wx.StaticText(self, wx.ID_ANY, ("Phone"))
        self.text_ctrl_phone = wx.TextCtrl(self, wx.ID_ANY, "")
        self.label_6 = wx.StaticText(self, wx.ID_ANY, ("DEO"))
        self.text_ctrl_deo = wx.TextCtrl(self, wx.ID_ANY, "")
        self.button_cancel = wx.Button(self, wx.ID_ANY, ("Cancel"))
        self.button_save = wx.Button(self, wx.ID_ANY, ("Save"))


        self.DB=db_operations()
        self.__set_properties()
        self.__do_layout()
        self.on_load()

        self.Bind(wx.EVT_BUTTON, self.on_cancel, self.button_cancel)
        self.Bind(wx.EVT_BUTTON, self.on_save, self.button_save)
        # end wxGlade
项目:MechWarfareScoring    作者:artanz    | 项目源码 | 文件源码
def __init__( self ):
        wx.Frame.__init__( self, None, wx.ID_ANY, "MWCam", style=wx.DEFAULT_FRAME_STYLE & ~wx.RESIZE_BORDER )

        # Socket Cleint
        self.SocketClient = MWScore.SocketClient( SOCKET_CLIENT_HOST, SOCKET_CLIENT_PORT )
        self.SocketClient.StartThread()

        # IP Camera
        #self.Camera = Trendnet( CAMERA_IP, CAMERA_USERNAME, CAMERA_PASSWORD )
        self.Camera = DLink( CAMERA_IP, CAMERA_USERNAME, CAMERA_PASSWORD )
        self.Camera.Connect()

        # Camera Panel
        self.CameraPanel = CameraPanel( self, self.Camera, self.SocketClient )

        # Frame timer
        self.Timer = wx.Timer( self, self.ID_FRAME_REFRESH )
        self.Timer.Start(10)
        wx.EVT_TIMER( self, self.ID_FRAME_REFRESH, self.Refresh )

        # Frame Sizer
        self.Sizer = None
        self.Size()

        # Show frame
        self.Show( True )
项目:multiplierz    作者:BlaisProteomics    | 项目源码 | 文件源码
def __init__(self, parent, filetypes, fileLimit = None):
        wx.Dialog.__init__(self, parent, -1, title = 'Select Input Files',
                           style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)

        self.filetypes = {}

        self.fileArray = wx.ListCtrl(self, -1, style = wx.LC_REPORT | wx.LC_EDIT_LABELS | wx.LC_HRULES | wx.LC_VRULES)
        for i, (filetype, ext) in enumerate(filetypes):
            self.fileArray.InsertColumn(i, filetype)

            assert filetype not in self.filetypes, "Non-unique file identifiers! %s" % filetype
            self.filetypes[filetype] = ext

        self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.getFile, self.fileArray)

        self.goButton = wx.Button(self, -1, "Use Selected Files")

        self.Bind(wx.EVT_BUTTON, self.complete, self.goButton)
        self.Bind(wx.EVT_CLOSE, self.abort)


        box = wx.BoxSizer(wx.VERTICAL)
        box.Add(self.fileArray, 1, wx.ALL | wx.EXPAND, 10)
        box.Add(self.goButton, 0, wx.ALL | wx.EXPAND, 10)
        self.SetSizerAndFit(box)


        self.SetSize(wx.Size(1200, 300))
        self.Bind(wx.EVT_SIZE, self.resize)

        for i in range(0, 10):
            self.fileArray.Append([''] * self.fileArray.GetColumnCount())
        self.resize(None)
        self.CentreOnScreen()
项目:wxpythoncookbookcode    作者:driscollis    | 项目源码 | 文件源码
def __init__(self):
        """Constructor"""
        no_caption = (wx.RESIZE_BORDER | wx.SYSTEM_MENU | wx.CAPTION
                      | wx.CLOSE_BOX | wx.CLIP_CHILDREN
                      | wx.FRAME_NO_TASKBAR)
        wx.Frame.__init__(self, None, title="No Max/Min", style=no_caption)
        panel = wx.Panel(self)
        self.Show()
项目:wxpythoncookbookcode    作者:driscollis    | 项目源码 | 文件源码
def __init__(self):
        """Constructor"""
        no_caption = (wx.MINIMIZE_BOX | wx.MAXIMIZE_BOX | wx.RESIZE_BORDER 
                      | wx.SYSTEM_MENU | wx.CLOSE_BOX | wx.CLIP_CHILDREN)
        wx.Frame.__init__(self, None, title="No Caption", style=no_caption)
        panel = wx.Panel(self)
        self.Show()
项目:wxpythoncookbookcode    作者:driscollis    | 项目源码 | 文件源码
def __init__(self):
        """Constructor"""
        default = (wx.MINIMIZE_BOX | wx.MAXIMIZE_BOX | wx.RESIZE_BORDER
                   | wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX
                   | wx.CLIP_CHILDREN)
        wx.Frame.__init__(self, None, title="Default Frame", style=default)
        panel = wx.Panel(self)
        self.Show()
项目:wxpythoncookbookcode    作者:driscollis    | 项目源码 | 文件源码
def __init__(self):
        """Constructor"""
        no_close = (wx.MINIMIZE_BOX | wx.MAXIMIZE_BOX | wx.RESIZE_BORDER
                    | wx.SYSTEM_MENU | wx.CAPTION | wx.CLIP_CHILDREN)
        wx.Frame.__init__(self, None, title="No Close", style=no_close)
        panel = wx.Panel(self)
        self.Show()
项目:wxpythoncookbookcode    作者:driscollis    | 项目源码 | 文件源码
def __init__(self):
        """Constructor"""
        no_resize = wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER |
                                                wx.MAXIMIZE_BOX)
        wx.Frame.__init__(self, None, title="No Resize", style=no_resize)
        panel = wx.Panel(self)
        self.Show()
项目:CAAPR    作者:Stargrazer82301    | 项目源码 | 文件源码
def __init__(self, parent, raw_header_str, caption,
                 pos=wx.DefaultPosition, size=(500,300),
                 style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER):
        self.parent = parent
        wx.Dialog.__init__(self, parent, -1, caption, pos, size, style)
        x, y = pos
        if x == -1 and y == -1:
            self.CenterOnScreen(wx.BOTH)
        self.cur_selection = (0, 0)
        self.raw_header_str = raw_header_str
        self.raw_header_str_lower = raw_header_str.lower()
        self.text = text = wx.TextCtrl(self, -1, raw_header_str, style=wx.TE_MULTILINE | wx.TE_READONLY)

        font1 = wx.Font(12, wx.FONTFAMILY_MODERN, wx.NORMAL, wx.FONTWEIGHT_LIGHT, False)
        self.text.SetFont(font1)
        self.text.SetInitialSize((600,400))

        main_sizer = wx.BoxSizer(wx.VERTICAL)
        main_sizer.Add(self.text, 1, wx.EXPAND | wx.ALL, border=5)
        ok = wx.Button(self, wx.ID_OK, "OK")
        ok.SetDefault()
        ok.Bind(wx.EVT_BUTTON, self.on_close)

        buttons_sizer = wx.BoxSizer(wx.HORIZONTAL)
        self.search = wx.SearchCtrl(self, size=(200, -1), style=wx.TE_PROCESS_ENTER)
        self.search.ShowSearchButton(True)
        self.search.ShowCancelButton(True)
        # TODO:  make layout of search & OK button prettier (OK should be right-aligned properly)
        buttons_sizer.Add(self.search, 0, wx.ALL | wx.EXPAND)
        buttons_sizer.Add((315, 0), 1, wx.EXPAND)
        buttons_sizer.Add(ok, 0, wx.ALL)
        main_sizer.Add(buttons_sizer, 0, wx.ALL, border=4)
        self.SetSizerAndFit(main_sizer)
        self.set_cur_selection()
        self.Bind(wx.EVT_SEARCHCTRL_SEARCH_BTN, self.on_search, self.search)
        self.Bind(wx.EVT_TEXT_ENTER, self.on_search, self.search)
        self.last_search_str = ''
        self.last_find_index = 0
        self.is_dialog_still_open = True
        self.Bind(wx.EVT_CLOSE, self.on_close)
        new_id = wx.NewId()
        self.Bind(wx.EVT_MENU, self.on_cmd_w, id=new_id)
        self.SetAcceleratorTable(wx.AcceleratorTable([(wx.ACCEL_CMD, ord(str('w')), new_id)]))
项目:CAAPR    作者:Stargrazer82301    | 项目源码 | 文件源码
def __init__(self, parent, raw_header_str, caption,
                 pos=wx.DefaultPosition, size=(500,300),
                 style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER):
        self.parent = parent
        wx.Dialog.__init__(self, parent, -1, caption, pos, size, style)
        x, y = pos
        if x == -1 and y == -1:
            self.CenterOnScreen(wx.BOTH)
        self.cur_selection = (0, 0)
        self.raw_header_str = raw_header_str
        self.raw_header_str_lower = raw_header_str.lower()
        self.text = text = wx.TextCtrl(self, -1, raw_header_str, style=wx.TE_MULTILINE | wx.TE_READONLY)

        font1 = wx.Font(12, wx.FONTFAMILY_MODERN, wx.NORMAL, wx.FONTWEIGHT_LIGHT, False)
        self.text.SetFont(font1)
        self.text.SetInitialSize((600,400))

        main_sizer = wx.BoxSizer(wx.VERTICAL)
        main_sizer.Add(self.text, 1, wx.EXPAND | wx.ALL, border=5)
        ok = wx.Button(self, wx.ID_OK, "OK")
        ok.SetDefault()
        ok.Bind(wx.EVT_BUTTON, self.on_close)

        buttons_sizer = wx.BoxSizer(wx.HORIZONTAL)
        self.search = wx.SearchCtrl(self, size=(200, -1), style=wx.TE_PROCESS_ENTER)
        self.search.ShowSearchButton(True)
        self.search.ShowCancelButton(True)
        # TODO:  make layout of search & OK button prettier (OK should be right-aligned properly)
        buttons_sizer.Add(self.search, 0, wx.ALL | wx.EXPAND)
        buttons_sizer.Add((315, 0), 1, wx.EXPAND)
        buttons_sizer.Add(ok, 0, wx.ALL)
        main_sizer.Add(buttons_sizer, 0, wx.ALL, border=4)
        self.SetSizerAndFit(main_sizer)
        self.set_cur_selection()
        self.Bind(wx.EVT_SEARCHCTRL_SEARCH_BTN, self.on_search, self.search)
        self.Bind(wx.EVT_TEXT_ENTER, self.on_search, self.search)
        self.last_search_str = ''
        self.last_find_index = 0
        self.is_dialog_still_open = True
        self.Bind(wx.EVT_CLOSE, self.on_close)
        new_id = wx.NewId()
        self.Bind(wx.EVT_MENU, self.on_cmd_w, id=new_id)
        self.SetAcceleratorTable(wx.AcceleratorTable([(wx.ACCEL_CMD, ord(str('w')), new_id)]))
项目:cellstar    作者:Fafa87    | 项目源码 | 文件源码
def __init__(self, images, parent=None, id=wx.ID_ANY, title='CellStar explorer', x=900, y=600):
        """
        @type images: ImageRepo
        """
        style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX
        wx.Dialog.__init__(self, parent, id, title, style=style)
        self.Size = (x, y)
        self.figure = mpl.figure.Figure(dpi=300, figsize=(1, 1))
        self.axes = self.figure.add_subplot(111)
        self.axes.margins(0, 0)
        self.canvas = Canvas(self, -1, self.figure)
        self.toolbar = Toolbar(self.canvas)
        self.toolbar.Realize()
        self.abort = False

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(self.canvas, 1, wx.EXPAND)
        sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND)
        self.SetSizer(sizer)

        self.layer0 = self.axes.imshow(images.image, cmap=mpl.cm.gray)

        def onclick_internal(event):
            if event.ydata is None:
                return

            print 'button=%d, x=%d, y=%d, xdata=%f, ydata=%f' % (
                event.button, event.x, event.y, event.xdata, event.ydata)

            if event.button != 1:
                self.onclick(event.button, event.xdata, event.ydata)
                self.figure.canvas.draw()

        def press_internal(event):
            print('press', event.key)
            if event.key == 'b':  # abort
                self.EndModal(ExplorerFrame.ABORTED)
            if event.key in 'qwerxcv':
                self.layer0.remove()
                if event.key == 'q':  # input
                    self.layer0 = self.axes.imshow(images.image, cmap=mpl.cm.gray)
                elif event.key == 'w':  # image clean
                    self.layer0 = self.axes.imshow(images.image_back_difference, cmap=mpl.cm.gray)
                elif event.key == 'x':  # image clean
                    self.layer0 = self.axes.imshow(images.image_back_difference_blurred, cmap=mpl.cm.gray)
                elif event.key == 'c':  # image clean
                    self.layer0 = self.axes.imshow(images.foreground_mask, cmap=mpl.cm.gray)
                elif event.key == 'v':  # image clean
                    self.layer0 = self.axes.imshow(images.background_mask, cmap=mpl.cm.gray)
                elif event.key == 'e':  # brighter
                    self.layer0 = self.axes.imshow(images.brighter, cmap=mpl.cm.gray)
                elif event.key == 'r':  # darker
                    self.layer0 = self.axes.imshow(images.darker, cmap=mpl.cm.gray)
                self.figure.canvas.draw()
            else:
                self.press(event.key)
                self.figure.canvas.draw()

        self.figure.canvas.mpl_connect('button_press_event', onclick_internal)
        self.figure.canvas.mpl_connect('key_press_event', press_internal)
        self.Show(True)
项目:pyjam    作者:10se1ucgo    | 项目源码 | 文件源码
def __init__(self, parent):
        super(DownloaderDialog, self).__init__(parent, title="pyjam Downloader",
                                               style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
        self.parent = parent

        self.audio_links = wx.TextCtrl(self)
        audio_link_text = wx.StaticText(self, label="URL(s) (Separate with commas)")

        self.out_dir = wx.DirPickerCtrl(self, path=os.path.abspath("downloads"))
        out_dir_text = wx.StaticText(self, label="Output directory")

        warning_text = wx.StaticText(self, style=wx.ALIGN_CENTRE_HORIZONTAL,
                                     label=("Note: The program will freeze for a bit while it processes the URL "
                                            "before downloading"))
        warning_text.Wrap(self.GetSize()[0])

        search_button = wx.Button(self, label="Search")

        top_sizer = wx.BoxSizer(wx.VERTICAL)
        control_sizer = wx.BoxSizer(wx.VERTICAL)
        text_sizer = wx.BoxSizer(wx.VERTICAL)
        button_sizer = self.CreateButtonSizer(wx.OK | wx.CANCEL)

        control_sizer.Add(audio_link_text, 0, wx.ALL ^ wx.LEFT | wx.ALIGN_LEFT, 3)
        control_sizer.Add(self.audio_links, 0, wx.ALL ^ wx.LEFT ^ wx.TOP | wx.ALIGN_LEFT | wx.EXPAND, 5)
        control_sizer.Add(out_dir_text, 0, wx.ALL ^ wx.LEFT | wx.ALIGN_LEFT, 3)
        control_sizer.Add(self.out_dir, 0, wx.ALL ^ wx.LEFT ^ wx.TOP | wx.ALIGN_LEFT | wx.EXPAND, 5)
        text_sizer.Add(warning_text, 0, wx.ALL | wx.ALIGN_CENTER, 5)
        button_sizer.Add(search_button)
        top_sizer.Add(control_sizer, 1, wx.ALL | wx.EXPAND | wx.ALIGN_TOP, 5)
        top_sizer.Add(text_sizer, 0, wx.ALL | wx.ALIGN_CENTER, 5)
        top_sizer.Add(button_sizer, 0, wx.ALL | wx.ALIGN_CENTER, 5)

        self.Bind(wx.EVT_BUTTON, handler=self.on_ok, id=wx.ID_OK)
        self.Bind(wx.EVT_BUTTON, handler=lambda x: SearchDialog(self), source=search_button)

        self.downloader = None
        self.progress_dialog = None
        self.num_songs = 0

        self.SetSizerAndFit(top_sizer)
        self.Center()
        self.ShowModal()
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: student_profie.__init__
        kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX | wx.MAXIMIZE | wx.MAXIMIZE_BOX | wx.SYSTEM_MENU | wx.RESIZE_BORDER | wx.CLIP_CHILDREN
        wx.Frame.__init__(self, *args, **kwds)
        self.panel_1 = wx.Panel(self, wx.ID_ANY, style=wx.RAISED_BORDER | wx.TAB_TRAVERSAL)
        self.combo_box_13 = wx.ComboBox(self.panel_1, wx.ID_ANY, choices=[], style=wx.CB_DROPDOWN)
        self.combo_box_14 = wx.ComboBox(self.panel_1, wx.ID_ANY, choices=[], style=wx.CB_DROPDOWN)
        self.combo_box_15 = wx.ComboBox(self.panel_1, wx.ID_ANY, choices=[], style=wx.CB_DROPDOWN)
        self.button_1 = wx.Button(self.panel_1, wx.ID_ANY, _("Add New"))
        self.text_ctrl_1 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_CENTRE)
        self.bitmap_button_2 = wx.BitmapButton(self.panel_1, wx.ID_ANY, wx.Bitmap("/media/ghssvythiri/10C63D64C63D4AEC/asif/sqlite_working_aug_16/Resources/img/pass.jpg", wx.BITMAP_TYPE_ANY), style=wx.BU_AUTODRAW)
        self.static_line_1 = wx.StaticLine(self.panel_1, wx.ID_ANY)
        self.bitmap_button_1 = wx.BitmapButton(self.panel_1, wx.ID_ANY, wx.Bitmap("/media/ghssvythiri/10C63D64C63D4AEC/asif/sqlite_working_aug_16/Resources/img/exit.jpg", wx.BITMAP_TYPE_ANY))
        self.label_1 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Name"))
        self.label_2 = wx.StaticText(self.panel_1, wx.ID_ANY, _("UID"))
        self.label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Gender"))
        self.text_ctrl_2 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "")
        self.text_ctrl_3 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "")
        self.combo_box_16 = wx.ComboBox(self.panel_1, wx.ID_ANY, choices=[], style=wx.CB_DROPDOWN)
        self.label_4 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Date of Birth"))
        self.label_5 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Category"))
        self.label_6 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Reigion"))
        self.text_ctrl_4 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "")
        self.text_ctrl_5 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "")
        self.text_ctrl_6 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "")
        self.label_7 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Caste"))
        self.label_8 = wx.StaticText(self.panel_1, wx.ID_ANY, _("First Language"))
        self.label_9 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Father"))
        self.text_ctrl_7 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "")
        self.text_ctrl_8 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "")
        self.text_ctrl_9 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "")
        self.label_10 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Mother"))
        self.label_11 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Mobile"))
        self.label_12 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Email"))
        self.text_ctrl_10 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "")
        self.text_ctrl_11 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "")
        self.text_ctrl_12 = wx.TextCtrl(self.panel_1, wx.ID_ANY, "")
        self.hyperlink_1 = wx.HyperlinkCtrl(self.panel_1, wx.ID_ANY, "", "")
        self.hyperlink_2 = wx.HyperlinkCtrl(self.panel_1, wx.ID_ANY, "", "")
        self.hyperlink_3 = wx.HyperlinkCtrl(self.panel_1, wx.ID_ANY, "", "")
        self.static_line_2 = wx.StaticLine(self.panel_1, wx.ID_ANY)
        self.button_3 = wx.Button(self.panel_1, wx.ID_ANY, _("Delete"))
        self.button_2 = wx.Button(self.panel_1, wx.ID_ANY, _("Close"))
        self.button_4 = wx.Button(self.panel_1, wx.ID_ANY, _("Save"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.on_search, self.bitmap_button_2)
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: promote.__init__
        kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.RESIZE_BORDER | wx.TAB_TRAVERSAL | wx.CLIP_CHILDREN
        wx.Dialog.__init__(self, *args, **kwds)
        self.panel_2 = wx.ScrolledWindow(self, -1, style=wx.TAB_TRAVERSAL)
        self.label_10 = wx.StaticText(self.panel_2, -1, "Current Class Details")
        self.combo_box_1 = wx.ComboBox(self.panel_2, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.combo_box_2 = wx.ComboBox(self.panel_2, -1, choices=["Select Standard", "8", "9", "10"], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.combo_box_3 = wx.ComboBox(self.panel_2, -1, choices=['Select Division'], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.static_line_1 = wx.StaticLine(self.panel_2, -1, style=wx.LI_VERTICAL)
        self.label_11 = wx.StaticText(self.panel_2, -1, "Promote/Move To")
        self.combo_box_4 = wx.ComboBox(self.panel_2, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.combo_box_5 = wx.ComboBox(self.panel_2, -1, choices=["Select Standard", "8", "9", "10"], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.combo_box_6 = wx.ComboBox(self.panel_2, -1, choices=['Select Division'], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY)
        self.static_line_2 = wx.StaticLine(self.panel_2, -1)
        self.panel_1 = wx.Panel(self.panel_2, -1)
        allLoc = ['Admission No                       Name']
        self.check_list_box_1 = wx.CheckListBox(self.panel_1, -1, (60, 50), (30,30), allLoc)
        self.check_list_box_2 = wx.CheckListBox(self.panel_1, -1, (60, 50), wx.DefaultSize, [])

        #self.list_box_2 = wx.ListBox(self.panel_1, -1, choices=[])
        #self.list_box_3 = wx.ListBox(self.panel_1, -1, choices=[])

        self.button_cancel = wx.Button(self.panel_2, -1, "Close")
        self.button_proceed = wx.Button(self.panel_2, -1, "Proceed")

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_COMBOBOX, self.oncombo_year1, self.combo_box_1)
        self.Bind(wx.EVT_COMBOBOX, self.oncombo_class1, self.combo_box_2)
        self.Bind(wx.EVT_COMBOBOX, self.oncombo_div1, self.combo_box_3)
        self.Bind(wx.EVT_COMBOBOX, self.oncombo_year2, self.combo_box_4)
        self.Bind(wx.EVT_COMBOBOX, self.oncombo_class2, self.combo_box_5)
        self.Bind(wx.EVT_COMBOBOX, self.oncombo_div2, self.combo_box_6)
        self.Bind(wx.EVT_CHECKLISTBOX, self.on_check, self.check_list_box_1)
        self.Bind(wx.EVT_CHECKLISTBOX, self.on_check_2, self.check_list_box_2)
        self.Bind(wx.EVT_BUTTON, self.on_cancel, self.button_cancel)
        self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed)
        self.checkedItems=()
        self.DB=db_operations()
        self.load_year(self.combo_box_1 ,self.combo_box_2 ,self.combo_box_3 )
        self.load_year(self.combo_box_4 ,self.combo_box_5 ,self.combo_box_6 )
        # end wxGlade
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def __init__(self, controller_uid):
        UIViewBase.__init__(self, controller_uid)
        wx.Frame.__init__(self, None, -1, title='LogPlotEditor',
                                          size=(950, 600),
                                          style=wx.DEFAULT_FRAME_STYLE & 
                                          (~wx.RESIZE_BORDER) &(~wx.MAXIMIZE_BOX)
        )   


        main_sizer = wx.BoxSizer(wx.VERTICAL)  
        self.base_panel = wx.Panel(self)
        self.note = wx.Notebook(self.base_panel)
        bsizer = wx.BoxSizer(wx.HORIZONTAL)
        bsizer.Add(self.note, 1, wx.ALL|wx.EXPAND, border=5)        
        self.base_panel.SetSizer(bsizer)

        #UIM = UIManager()
        #UIM.create('lpe_track_panel_controller', self.uid)
        #parent_controller_uid = UIM._getparentuid(self._controller_uid)        

        '''
        tracks_base_panel = wx.Panel(note, style=wx.SIMPLE_BORDER)
        sizer_grid_panel = wx.BoxSizer(wx.VERTICAL)
        self.tracks_model = TracksModel(parent_controller_uid)
        tp = TracksPanel(tracks_base_panel, self.tracks_model)
        sizer_grid_panel.Add(tp, 1, wx.EXPAND|wx.ALL, border=10)
        tracks_base_panel.SetSizer(sizer_grid_panel)
        note.AddPage(tracks_base_panel, "Tracks", True)
        '''

        '''
        curves_base_panel = wx.Panel(note, style=wx.SIMPLE_BORDER)
        sizer_curves_panel = wx.BoxSizer(wx.VERTICAL)
        self.curves_model = CurvesModel(parent_controller_uid)
        cp = TrackObjectsPanel(curves_base_panel, self.curves_model)
        sizer_curves_panel.Add(cp, 1, wx.EXPAND|wx.ALL, border=10)
        curves_base_panel.SetSizer(sizer_curves_panel)
        note.AddPage(curves_base_panel, "Objects", True)
        '''

        main_sizer.Add(self.base_panel, 1, wx.EXPAND)
        bottom_panel = wx.Panel(self)
        sizer = wx.BoxSizer(wx.VERTICAL)
        btn_close = wx.Button(bottom_panel, -1, "Close")
        sizer.Add(btn_close, 0, wx.ALIGN_RIGHT|wx.RIGHT|wx.BOTTOM, border=10)
        btn_close.Bind(wx.EVT_BUTTON, self.on_close)
        bottom_panel.SetSizer(sizer)        
        main_sizer.Add(bottom_panel, 0,  wx.EXPAND)
        self.SetSizer(main_sizer)
        class_full_name = str(self.__class__.__module__) + '.' + str(self.__class__.__name__)    
        log.debug('Successfully created View object from class: {}.'.format(class_full_name))
        self.Bind(wx.EVT_CLOSE, self.on_close)
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def __init__(self, logplot, track_id=ID_ALL_TRACKS, logplotformat=None, ok_callback=None):

        self.logplot = logplot
        self.track_id = track_id

        self.welluid = self.logplot.get_well_uid()
        self._OM = ObjectManager(self)
        #well = self._OM.get(self.welluid)

        if logplotformat is None:
            logplotformat = LogPlotFormat()
        self.original_logplotformat = logplotformat
        self.edited_logplotformat = copy.deepcopy(self.original_logplotformat)


        wx.Frame.__init__(self, self.logplot, -1,
                                          title="Log Plot Format - TESTE",
                                          size=(850, 600),
                                          style=wx.DEFAULT_FRAME_STYLE & 
                                          (~wx.RESIZE_BORDER) &(~wx.MAXIMIZE_BOX))

        self.callback = ok_callback             
        sizer = wx.BoxSizer(wx.VERTICAL)                                  
        self.base = wx.Panel(self)
        note = wx.Notebook(self.base)
        bsizer = wx.BoxSizer(wx.HORIZONTAL)
        bsizer.Add(note, 1, wx.ALL|wx.EXPAND, border=5)        
        self.base.SetSizer(bsizer)

        self.tracks_model = None
        self.curves_model = CurvesModel(self.edited_logplotformat, self.track_id)

        if self.track_id == self.ID_ALL_TRACKS:
            self.tracks_model = TracksModel(self.edited_logplotformat)
            tn = TracksNotifier(self.edited_logplotformat, self.curves_model)
            self.tracks_model.AddNotifier(tn)
            tn.SetOwner(self.tracks_model)
            self.grid_panel = BasePanel(note, 'grid', self.welluid, self.track_id, self.tracks_model)                  
            note.AddPage(self.grid_panel, "Grid", True)
        else:
            self.grid_panel = None
        if self.tracks_model is not None:    
            cn = CurvesNotifier(self.edited_logplotformat, self.tracks_model)
            self.curves_model.AddNotifier(cn)
            cn.SetOwner(self.curves_model) 
        self.curves_panel = BasePanel(note, 'curves', self.welluid, self.track_id, self.curves_model)
        note.AddPage(self.curves_panel, "Curves", False)


        note.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self._OnNotePageChanging)
        sizer.Add(self.base, 1, wx.EXPAND)
        sizer.Add(self.getPanelBottomButtons(), 0, wx.EXPAND|wx.BOTTOM|wx.TOP)
        self.SetSizer(sizer)
项目:pyjam    作者:10se1ucgo    | 项目源码 | 文件源码
def __init__(self, parent, rate=None, out_dir=None, in_dir=None):
        super(FFmpegConvertDialog, self).__init__(parent=parent, title="pyjam Audio Converter",
                                                  style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)

        self.in_dir = in_dir

        self.game_rate = intctrl.IntCtrl(self)
        game_rate_text = wx.StaticText(self, label="Audio rate")
        if rate is not None:
            self.game_rate.SetValue(rate)

        self.volume = wx.SpinCtrl(self, initial=85)
        volume_text = wx.StaticText(self, label="Volume %")

        self.in_picker = wx.FilePickerCtrl(self, style=wx.FLP_USE_TEXTCTRL)
        in_picker_text = wx.StaticText(self, label="Input file names (manually changing them has no effect)")
        self.in_files = []
        # the dumbest thing i've done all year (i'm overriding the controls of the PickerBase)
        for child in self.in_picker.GetChildren():
            if isinstance(child, wx.Button):
                child.Bind(wx.EVT_BUTTON, self.browse)

        self.out_dir = wx.DirPickerCtrl(self, name="Output directory")
        out_dir_text = wx.StaticText(self, label="Output directory")
        if out_dir is not None:
            self.out_dir.SetPath(out_dir)

        top_sizer = wx.BoxSizer(wx.VERTICAL)
        top_row = wx.BoxSizer(wx.HORIZONTAL)
        rate_sizer = wx.BoxSizer(wx.VERTICAL)
        vol_sizer = wx.BoxSizer(wx.VERTICAL)
        dir_sizer = wx.BoxSizer(wx.VERTICAL)
        button_sizer = self.CreateButtonSizer(wx.OK | wx.CANCEL)

        rate_sizer.Add(game_rate_text, 0, wx.ALL ^ wx.BOTTOM | wx.ALIGN_LEFT, 5)
        rate_sizer.Add(self.game_rate, 0, wx.ALL | wx.ALIGN_LEFT, 5)
        vol_sizer.Add(volume_text, 0, wx.ALL ^ wx.BOTTOM | wx.ALIGN_LEFT, 5)
        vol_sizer.Add(self.volume, 0, wx.ALL | wx.ALIGN_LEFT, 5)
        top_row.Add(rate_sizer)
        top_row.Add(vol_sizer)
        dir_sizer.Add(in_picker_text, 0, wx.ALL ^ wx.LEFT | wx.ALIGN_LEFT, 3)
        dir_sizer.Add(self.in_picker, 0, wx.ALL ^ wx.LEFT ^ wx.TOP | wx.ALIGN_LEFT | wx.EXPAND, 5)
        dir_sizer.Add(out_dir_text, 0, wx.ALL ^ wx.LEFT | wx.ALIGN_LEFT, 3)
        dir_sizer.Add(self.out_dir, 0, wx.ALL ^ wx.LEFT ^ wx.TOP | wx.ALIGN_LEFT | wx.EXPAND, 5)
        top_sizer.Add(top_row)
        top_sizer.Add(dir_sizer, 1, wx.ALL | wx.EXPAND | wx.ALIGN_TOP, 5)
        top_sizer.Add(button_sizer, 0, wx.ALL | wx.ALIGN_CENTER, 5)

        self.Bind(wx.EVT_BUTTON, self.on_ok, id=wx.ID_OK)
        self.Bind(wx.EVT_BUTTON, self.on_cancel, id=wx.ID_CANCEL)

        self.converter = None
        self.progress_dialog = None
        self.num_songs = 0

        self.SetSizer(top_sizer)
        # self.SetSize(400, 250)
        self.Center()
        self.ShowModal()