Python wx 模块,TAB_TRAVERSAL 实例源码

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

项目:Crypter    作者:sithis993    | 项目源码 | 文件源码
def __init__( self, parent ):
        wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"Encrypted Files", pos = wx.DefaultPosition, size = wx.Size( 600,400 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )

        self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )

        BodySizer = wx.BoxSizer( wx.VERTICAL )

        self.m_panel4 = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
        TextCtrlSizer = wx.BoxSizer( wx.VERTICAL )

        self.EncryptedFilesTextCtrl = wx.TextCtrl( self.m_panel4, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.TE_DONTWRAP|wx.TE_MULTILINE|wx.TE_READONLY )
        TextCtrlSizer.Add( self.EncryptedFilesTextCtrl, 1, wx.ALL|wx.EXPAND, 5 )


        self.m_panel4.SetSizer( TextCtrlSizer )
        self.m_panel4.Layout()
        TextCtrlSizer.Fit( self.m_panel4 )
        BodySizer.Add( self.m_panel4, 1, wx.EXPAND |wx.ALL, 5 )


        self.SetSizer( BodySizer )
        self.Layout()

        self.Centre( wx.BOTH )
项目:Pigrow    作者:Pragmatismo    | 项目源码 | 文件源码
def __init__( self, parent ):
        win_height = parent.GetSize()[1]
        height_of_pannels_above = 230
        space_left = win_height - height_of_pannels_above
        wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = (0, height_of_pannels_above), size = wx.Size(285, space_left), style = wx.TAB_TRAVERSAL )
        # Start drawing the UI elements
        wx.StaticText(self,  label='Pigrow Config', pos=(25, 10))
        self.update_config_btn = wx.Button(self, label='read config from pigrow', pos=(15, 60), size=(175, 30))
        self.update_config_btn.Bind(wx.EVT_BUTTON, self.update_config_click)
        self.name_box_btn = wx.Button(self, label='change box name', pos=(15, 95), size=(175, 30))
        self.name_box_btn.Bind(wx.EVT_BUTTON, self.name_box_click)
        self.config_lamp_btn = wx.Button(self, label='config lamp', pos=(15, 130), size=(175, 30))
        self.config_lamp_btn.Bind(wx.EVT_BUTTON, self.config_lamp_click)
        self.config_dht_btn = wx.Button(self, label='config dht', pos=(15, 165), size=(175, 30))
        self.config_dht_btn.Bind(wx.EVT_BUTTON, self.config_dht_click)
        self.new_gpio_btn = wx.Button(self, label='Add new relay device', pos=(15, 200), size=(175, 30))
        self.new_gpio_btn.Bind(wx.EVT_BUTTON, self.add_new_device_relay)
        self.update_settings_btn = wx.Button(self, label='update pigrow settings', pos=(15, 235), size=(175, 30))
        self.update_settings_btn.Bind(wx.EVT_BUTTON, self.update_setting_click)
项目:Pigrow    作者:Pragmatismo    | 项目源码 | 文件源码
def __init__( self, parent ):
        win_height = parent.GetSize()[1]
        win_width = parent.GetSize()[0]
        w_space_left = win_width - 285
        wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = (285, 0), size = wx.Size(w_space_left , 800), style = wx.TAB_TRAVERSAL )
        ## Draw UI elements
        png = wx.Image('./config_info.png', wx.BITMAP_TYPE_ANY).ConvertToBitmap()
        wx.StaticBitmap(self, -1, png, (0, 0), (png.GetWidth(), png.GetHeight()))
        #SDcard details
        config_info_pnl.boxname_text = wx.TextCtrl(self,  pos=(25, 150), size=(265,65))
        config_info_pnl.location_text = wx.StaticText(self,  label='locations', pos=(520, 120), size=(200,30))
        config_info_pnl.config_text = wx.StaticText(self,  label='config', pos=(520, 185), size=(200,30))
        config_info_pnl.lamp_text = wx.StaticText(self,  label='lamp', pos=(10, 330), size=(200,30))
        config_info_pnl.dht_text = wx.StaticText(self,  label='dht', pos=(10, 415), size=(200,30))
        config_info_pnl.gpio_table = self.GPIO_list(self, 1)
        config_info_pnl.gpio_table.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.onDoubleClick_GPIO)
项目:Pigrow    作者:Pragmatismo    | 项目源码 | 文件源码
def __init__( self, parent ):
        win_height = parent.GetSize()[1]
        height_of_pannels_above = 230
        space_left = win_height - height_of_pannels_above

        wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = (0, height_of_pannels_above), size = wx.Size(285, space_left), style = wx.TAB_TRAVERSAL )
        wx.StaticText(self,  label='Cron Config Menu', pos=(25, 10))
        self.read_cron_btn = wx.Button(self, label='Read Crontab', pos=(10, 40), size=(175, 30))
        self.read_cron_btn.Bind(wx.EVT_BUTTON, self.read_cron_click)
        self.new_cron_btn = wx.Button(self, label='New cron job', pos=(10, 80), size=(175, 30))
        self.new_cron_btn.Bind(wx.EVT_BUTTON, self.new_cron_click)
        self.update_cron_btn = wx.Button(self, label='Update Cron', pos=(10, 120), size=(175, 30))
        self.update_cron_btn.Bind(wx.EVT_BUTTON, self.update_cron_click)
        self.SetBackgroundColour('sea green') #TESTING ONLY REMOVE WHEN SIZING IS DONE AND ALL THAT BUSINESS

        bSizer = wx.BoxSizer(wx.VERTICAL)
        bSizer.Add(self.read_cron_btn, 0, wx.ALL, 5)
        bSizer.Add(self.new_cron_btn, 0, wx.ALL, 5)
        bSizer.Add(self.update_cron_btn, 0, wx.ALL, 5)
        self.SetSizer(bSizer)
项目:Pigrow    作者:Pragmatismo    | 项目源码 | 文件源码
def __init__( self, parent ):
        wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = (0,0), size = wx.Size( 285,190 ), style = wx.TAB_TRAVERSAL )
        self.SetBackgroundColour((150,230,170)) #TESTING ONLY REMOVE WHEN SIZING IS DONE AND ALL THAT BUSINESS
        pi_link_pnl.target_ip = ''
        pi_link_pnl.target_user = ''
        pi_link_pnl.target_pass = ''
        pi_link_pnl.config_location_on_pi = '/home/pi/Pigrow/config/pigrow_config.txt'
     ## the three boxes for pi's connection details, IP, Username and Password
        self.l_ip = wx.StaticText(self,  label='address', pos=(10, 20))
        self.tb_ip = wx.TextCtrl(self, pos=(125, 25), size=(150, 25))
        self.tb_ip.SetValue("192.168.1.")
        self.l_user = wx.StaticText(self,  label='Username', pos=(10, 60))
        self.tb_user = wx.TextCtrl(self, pos=(125, 60), size=(150, 25))
        self.tb_user.SetValue("pi")
        self.l_pass = wx.StaticText(self,  label='Password', pos=(10, 95))
        self.tb_pass = wx.TextCtrl(self, pos=(125, 95), size=(150, 25))
        self.tb_pass.SetValue("raspberry")
     ## link with pi button
        self.link_with_pi_btn = wx.Button(self, label='Link to Pi', pos=(10, 125), size=(175, 30))
        self.link_with_pi_btn.Bind(wx.EVT_BUTTON, self.link_with_pi_btn_click)
        self.link_status_text = wx.StaticText(self,  label='-- no link --', pos=(25, 160))
     ## seek next pi button
        self.seek_for_pigrows_btn = wx.Button(self, label='Seek next', pos=(190,125))
        self.seek_for_pigrows_btn.Bind(wx.EVT_BUTTON, self.seek_for_pigrows_click)
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def _init_ctrls(self, prnt):
        wx.Panel.__init__(self, id=ID_SEARCHRESULTPANEL,
                          name='SearchResultPanel', parent=prnt, pos=wx.Point(0, 0),
                          size=wx.Size(0, 0), style=wx.TAB_TRAVERSAL)

        self.HeaderLabel = wx.StaticText(id=ID_SEARCHRESULTPANELHEADERLABEL,
                                         name='HeaderLabel', parent=self,
                                         pos=wx.Point(0, 0), size=wx.Size(0, 17), style=0)

        search_results_tree_style = CT.TR_HAS_BUTTONS | CT.TR_NO_LINES | CT.TR_HAS_VARIABLE_ROW_HEIGHT
        self.SearchResultsTree = CT.CustomTreeCtrl(id=ID_SEARCHRESULTPANELSEARCHRESULTSTREE,
                                                   name="SearchResultsTree", parent=self,
                                                   pos=wx.Point(0, 0), style=search_results_tree_style)
        if wx.VERSION >= (2, 8, 11):
            self.SearchResultsTree.SetAGWWindowStyleFlag(search_results_tree_style)
        self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.OnSearchResultsTreeItemActivated,
                  id=ID_SEARCHRESULTPANELSEARCHRESULTSTREE)

        self.ResetButton = wx.lib.buttons.GenBitmapButton(
            self, bitmap=GetBitmap("reset"),
            size=wx.Size(28, 28), style=wx.NO_BORDER)
        self.ResetButton.SetToolTipString(_("Reset search result"))
        self.Bind(wx.EVT_BUTTON, self.OnResetButton, self.ResetButton)

        self._init_sizers()
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def _create_NetworkEditor(self, prnt):
        self.NetworkEditor = wx.Panel(
            id=-1, parent=prnt, pos=wx.Point(0, 0),
            size=wx.Size(0, 0), style=wx.TAB_TRAVERSAL)

        NetworkEditorTemplate._init_ctrls(self, self.NetworkEditor)

        main_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=1, vgap=0)
        main_sizer.AddGrowableCol(0)
        main_sizer.AddGrowableRow(0)

        main_sizer.AddWindow(self.NetworkNodes, 0, border=5, flag=wx.GROW | wx.ALL)

        self.NetworkEditor.SetSizer(main_sizer)

        return self.NetworkEditor
项目:imagepy    作者:Image-Py    | 项目源码 | 文件源码
def buildToolsBar(parent, datas):    
    box = wx.BoxSizer( wx.HORIZONTAL )
    #toolsbar =  wx.ToolBar( parent, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TB_HORIZONTAL ) 
    toolsbar = wx.Panel( parent, wx.ID_ANY, 
                         wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )

    toolsbar.SetSizer( box )
    add_tools(toolsbar, datas[1][0][1], None)

    gifpath = os.path.join(root_dir, "tools/drop.gif")
    btn = wx.BitmapButton(toolsbar, wx.ID_ANY, make_bitmap(wx.Bitmap(gifpath)),
                          wx.DefaultPosition, (32, 32), wx.BU_AUTODRAW|wx.RAISED_BORDER)

    box.Add(btn)
    btn.Bind(wx.EVT_LEFT_DOWN, lambda x:menu_drop(parent, toolsbar, datas, btn, x))
    add_tools(toolsbar, datas[1][1][1])
    return toolsbar
项目:imagepy    作者:Image-Py    | 项目源码 | 文件源码
def rgb(self, hist):
        panel = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
        back = wx.BoxSizer( wx.VERTICAL )
        back.Add(panel, 1, wx.EXPAND)
        sizer = wx.BoxSizer( wx.VERTICAL )
        rgb = ['Red', 'Green', 'Blue']
        for i in (0,1,2):
            histc = HistCanvas(panel)
            histc.set_hist(hist[i])
            txt = wx.StaticText( panel, wx.ID_ANY, 'Channel:'+ rgb[i], wx.DefaultPosition, wx.DefaultSize, 0 )
            sizer.Add( txt, 0, wx.LEFT|wx.RIGHT, 8 )
            sizer.Add( histc, 0, wx.LEFT|wx.RIGHT, 8 )
            mean, lim = np.dot(hist[i], range(256))/hist[i].sum(), np.where(hist[i]>0)[0]
            sta = 'Statistic:   Mean:%s   Min:%s   Max:%s'%(mean.round(1), lim.min(), lim.max())
            txt = wx.StaticText( panel, wx.ID_ANY, sta, wx.DefaultPosition, wx.DefaultSize, 0 )
            sizer.Add( txt, 0, wx.LEFT|wx.RIGHT|wx.BOTTOM, 8 )
        panel.SetSizer( sizer )
        self.SetSizer(back)
        self.Fit()
项目:SIMreader    作者:stoic1979    | 项目源码 | 文件源码
def __init__(self, parent, ID=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.TAB_TRAVERSAL, name="panel"):
        wx.Panel.__init__(self, parent, ID, pos, size, style, name)
        self.SetBackgroundColour(backgroundColour)
项目:fritzchecksum    作者:mementum    | 项目源码 | 文件源码
def __init__( self, parent ):
        wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size( -1,-1 ), style = wx.TAB_TRAVERSAL )

        bSizer111 = wx.BoxSizer( wx.VERTICAL )

        self.m_textCtrlDocument = wx.TextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( -1,-1 ), wx.TE_AUTO_URL|wx.TE_MULTILINE|wx.TE_READONLY )
        bSizer111.Add( self.m_textCtrlDocument, 1, wx.ALIGN_CENTER_HORIZONTAL|wx.EXPAND, 5 )


        self.SetSizer( bSizer111 )
        self.Layout()
        bSizer111.Fit( self )
项目:Pigrow    作者:Pragmatismo    | 项目源码 | 文件源码
def __init__( self, parent ):
        win_height = parent.GetSize()[1]
        height_of_pannels_above = 230
        space_left = win_height - height_of_pannels_above
        wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = (0, height_of_pannels_above), size = wx.Size(285, space_left), style = wx.TAB_TRAVERSAL )
        # Start drawing the UI elements
        wx.StaticText(self,  label='System Config Menu', pos=(25, 10))
        self.read_system_btn = wx.Button(self, label='Read System Info', pos=(10, 70), size=(175, 30))
        self.read_system_btn.Bind(wx.EVT_BUTTON, self.read_system_click)
        self.update_pigrow_btn = wx.Button(self, label='update pigrow', pos=(10, 100), size=(175, 30))
        self.update_pigrow_btn.Bind(wx.EVT_BUTTON, self.update_pigrow_click)
        self.reboot_pigrow_btn = wx.Button(self, label='reboot pigrow', pos=(10, 130), size=(175, 30))
        self.reboot_pigrow_btn.Bind(wx.EVT_BUTTON, self.reboot_pigrow_click)
项目:Pigrow    作者:Pragmatismo    | 项目源码 | 文件源码
def __init__( self, parent ):
        win_height = parent.GetSize()[1]
        win_width = parent.GetSize()[0]
        w_space_left = win_width - 285
        wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = (285, 0), size = wx.Size(w_space_left , 800), style = wx.TAB_TRAVERSAL )
        ## Draw UI elements
        png = wx.Image('./sysconf.png', wx.BITMAP_TYPE_ANY).ConvertToBitmap()
        wx.StaticBitmap(self, -1, png, (0, 0), (png.GetWidth(), png.GetHeight()))
        #SDcard details
        system_info_pnl.sys_hdd_total = wx.StaticText(self,  label='total;', pos=(250, 180), size=(200,30))
        system_info_pnl.sys_hdd_remain = wx.StaticText(self,  label='free;', pos=(250, 250), size=(200,30))
        system_info_pnl.sys_hdd_used = wx.StaticText(self,  label='Used;', pos=(250, 215), size=(200,30))
        system_info_pnl.sys_pigrow_folder = wx.StaticText(self,  label='Pigrow folder;', pos=(250, 285), size=(200,30))
        #Software details
        system_info_pnl.sys_os_name = wx.StaticText(self,  label='os installed;', pos=(250, 365), size=(200,30))
        #system_info_pnl.sys_pigrow_version = wx.StaticText(self,  label='pigrow version;', pos=(250, 405), size=(200,30))
        system_info_pnl.sys_pigrow_update = wx.StaticText(self,  label='Pigrow update status', pos=(250, 450), size=(200,30))
        #wifi deatils
        system_info_pnl.sys_network_name = wx.StaticText(self,  label='network name', pos=(250, 535), size=(200,30))
        system_info_pnl.wifi_list = wx.StaticText(self,  label='wifi list', pos=(140, 620), size=(200,30))

        #camera details
        system_info_pnl.sys_camera_info = wx.StaticText(self,  label='camera info', pos=(585, 170), size=(200,30))
        #power level warning details
        system_info_pnl.sys_power_status = wx.StaticText(self,  label='power status', pos=(625, 390), size=(200,30))
        # Raspberry Pi revision
        system_info_pnl.sys_pi_revision = wx.StaticText(self,  label='raspberry pi version', pos=(625, 450), size=(200,30))
        # Pi datetime vs local pc datetime
        system_info_pnl.sys_pi_date = wx.StaticText(self,  label='datetime on pi', pos=(625, 495), size=(500,30))
        system_info_pnl.sys_pc_date = wx.StaticText(self,  label='datetime on local pc', pos=(625, 525), size=(200,30))
        #system_info_pnl.sys_time_diff = wx.StaticText(self,  label='difference', pos=(700, 555), size=(200,30))

#
#
#
### pigrow Config pannel
#
#
项目:Pigrow    作者:Pragmatismo    | 项目源码 | 文件源码
def __init__( self, parent ):
        win_height = parent.GetSize()[1]
        win_width = parent.GetSize()[0]
        w_space_left = win_width - 285
        wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = (285, 0), size = wx.Size(w_space_left , 800), style = wx.TAB_TRAVERSAL )
        #set blank variables
        localfiles_info_pnl.local_path = ""
        ## Draw UI elements
        png = wx.Image('./localfiles.png', wx.BITMAP_TYPE_ANY).ConvertToBitmap()
        wx.StaticBitmap(self, -1, png, (0, 0), (png.GetWidth(), png.GetHeight()))
        # placing the information boxes
        localfiles_info_pnl.local_path_txt = wx.StaticText(self,  label='local path', pos=(220, 80), size=(200,30))
        #local photo storage info
        localfiles_info_pnl.caps_folder = 'caps'
        localfiles_info_pnl.folder_text = wx.StaticText(self,  label=' ' + localfiles_info_pnl.caps_folder, pos=(720, 130), size=(200,30))
        localfiles_info_pnl.photo_text = wx.StaticText(self,  label='photo text', pos=(575, 166), size=(170,30))
        localfiles_info_pnl.first_photo_title = wx.StaticText(self,  label='first image', pos=(575, 290), size=(170,30))
        localfiles_info_pnl.last_photo_title = wx.StaticText(self,  label='last image', pos=(575, 540), size=(170,30))
        #file list boxes
        localfiles_info_pnl.config_files = self.config_file_list(self, 1, pos=(5, 160), size=(550, 200))
        localfiles_info_pnl.config_files.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.onDoubleClick_config)
        localfiles_info_pnl.logs_files = self.logs_file_list(self, 1, pos=(5, 390), size=(550, 200))
        localfiles_info_pnl.logs_files.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.onDoubleClick_logs)
        #localfiles_info_pnl.config_files = self.config_file_list(self, 1, pos=(5, 160), size=(550, 200))
    #    localfiles_info_pnl.config_files.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.onDoubleClick_config)
        #cron info text
        localfiles_info_pnl.cron_info = wx.StaticText(self,  label='cron info', pos=(290, 635), size=(200,30))
项目:Pigrow    作者:Pragmatismo    | 项目源码 | 文件源码
def __init__( self, parent ):
        win_height = parent.GetSize()[1]
        height_of_pannels_above = 230
        space_left = win_height - height_of_pannels_above
        wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = (0, height_of_pannels_above), size = wx.Size(285, space_left), style = wx.TAB_TRAVERSAL )
        # Start drawing the UI elements
        wx.StaticText(self,  label='Local file and backup options', pos=(25, 10))
        self.update_local_filelist_btn = wx.Button(self, label='Refresh Filelist Info', pos=(15, 60), size=(175, 30))
        self.update_local_filelist_btn.Bind(wx.EVT_BUTTON, self.update_local_filelist_click)
        self.download_btn = wx.Button(self, label='Download files', pos=(15, 95), size=(175, 30))
        self.download_btn.Bind(wx.EVT_BUTTON, self.download_click)
        self.upload_btn = wx.Button(self, label='Restore to pi', pos=(15, 130), size=(175, 30))
        self.upload_btn.Bind(wx.EVT_BUTTON, self.upload_click)
项目:Pigrow    作者:Pragmatismo    | 项目源码 | 文件源码
def __init__( self, parent ):
        wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = (285, 0), size = wx.Size( 910,800 ), style = wx.TAB_TRAVERSAL )
        self.SetBackgroundColour((150,210,170)) #TESTING ONLY REMOVE WHEN SIZING IS DONE AND ALL THAT BUSINESS
        png = wx.Image('./splash.png', wx.BITMAP_TYPE_ANY).ConvertToBitmap()
        wx.StaticBitmap(self, -1, png, (0, 0), (png.GetWidth(), png.GetHeight()))
项目:Pigrow    作者:Pragmatismo    | 项目源码 | 文件源码
def __init__( self, parent ):
        wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = (0, 190), size = wx.Size( 285,35 ), style = wx.TAB_TRAVERSAL )
        self.SetBackgroundColour((230,200,170)) #TESTING ONLY REMOVE WHEN SIZING IS DONE AND ALL THAT BUSINESS
        view_opts = ['System Config', 'Pigrow Setup', 'Camera Config', 'Cron Timing', 'multi-script', 'Local Files', 'Timelapse', 'Graphs', 'Live View', 'pieye watcher']
        #Showing only completed tabs
        view_opts = ['System Config', 'Pigrow Setup', 'Cron Timing', 'Local Files']
        self.view_cb = wx.ComboBox(self, choices = view_opts, pos=(10,2), size=(265, 30))
        self.view_cb.Bind(wx.EVT_COMBOBOX, self.view_combo_go)
项目:magic-card-database    作者:drknotter    | 项目源码 | 文件源码
def __init__(self,parent=None,fname=None):
        wx.Notebook.__init__(self,parent,style=wx.TAB_TRAVERSAL)
        self.parent = parent

        if not fname:
            fname = 'my_library.db'
        self.db_conn = sqlite3.connect(fname);
        self.db_conn.row_factory = sqlite3.Row
        self.db_cursor = self.db_conn.cursor();

        self.db_cursor.execute('select * from cards')
        self.my_library = self.db_cursor.fetchall()

        # ***** initialize the my_library tab *****
        self.my_library_tab = wx.ScrolledWindow(self)
        self.my_library_grid = wx.grid.Grid(self.my_library_tab)
        self.my_library_grid.SetMinSize((350,355))
        self.current_row = -1

        my_library_sizer = wx.FlexGridSizer(rows=1,cols=1)
        my_library_sizer.SetMinSize(size=(350,363))
        self.my_library_tab.SetSizer(my_library_sizer)

        self.my_library_grid.CreateGrid(0,0)
        self.my_library_grid.EnableEditing(False)
        self.my_library_grid.SetColLabelSize(wx.grid.GRID_AUTOSIZE)
        self.Bind(wx.grid.EVT_GRID_LABEL_LEFT_CLICK, self.change_sort_by)

        self.my_library_fields = ['Card Name','Qty']
        self.my_library_sort_by = ['Card Name','v']

        my_library_sizer.Add(item=self.my_library_grid,flag=wx.EXPAND)
        my_library_sizer.AddGrowableCol(0,1)
        my_library_sizer.AddGrowableRow(0,1)

        self.AddPage(self.my_library_tab,text='My Library')

        self.my_library_grid.Bind(wx.grid.EVT_GRID_SELECT_CELL,self.cell_selected)
        self.update_my_library_grid()
项目:imagepy    作者:Image-Py    | 项目源码 | 文件源码
def __init__(self, parent ):
        wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, 
                            pos = wx.DefaultPosition, size = wx.Size(256,81), 
                            style = wx.TAB_TRAVERSAL )
        self.init_buf()
        self.his = None
        self.update = False
        self.x1, self.x2 = 0, 255
        self.Bind(wx.EVT_SIZE, self.on_size)  
        self.Bind(wx.EVT_IDLE, self.on_idle)
        self.Bind(wx.EVT_PAINT, self.on_paint)
项目:imagepy    作者:Image-Py    | 项目源码 | 文件源码
def __init__( self, parent ):
        wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = 'ImagePy', 
                            size = wx.Size(-1,-1), pos = wx.DefaultPosition, 
                            style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )
        logopath = os.path.join(root_dir, 'data/logo.ico')
        #self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_3DLIGHT ) )
        self.SetIcon(wx.Icon(logopath, wx.BITMAP_TYPE_ICO))
        self.SetSizeHints( wx.Size( 600,-1 ), wx.DefaultSize )
        IPy.curapp = self
        # Todo:Fixed absolute/relative path!
        # print("menuspath:{}".format( os.path.join(root_dir,"menus")))
        # print("toolspath:{}".format(os.path.join(root_dir,"tools"))
        # menuspath = os.path.join(root_dir, "menus")
        # toolspath = os.path.join(root_dir,"tools")
        self.menubar = pluginloader.buildMenuBarByPath(self, 'menus')
        self.SetMenuBar( self.menubar )
        self.shortcut = pluginloader.buildShortcut(self)
        self.SetAcceleratorTable(self.shortcut)
        sizer = wx.BoxSizer(wx.VERTICAL)
        self.toolbar = toolsloader.build_tools(self, 'tools')

        #self.toolbar.Realize()
        #sizertool.Add(self.toolbar, 1, 0, 5 )
        #sizertool.Add(self.morebar, 0, 0, 5)
        sizer.Add(self.toolbar, 0, wx.EXPAND, 5 )
        #sizer.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )
        self.line_color = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
        #self.line_color.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_HIGHLIGHT ) )
        sizer.AddStretchSpacer(prop=1)
        sizer.Add(self.line_color, 0, wx.EXPAND |wx.ALL, 0 )
        stapanel = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
        sizersta = wx.BoxSizer( wx.HORIZONTAL )
        self.txt_info = wx.StaticText( stapanel, wx.ID_ANY, "ImagePy  v0.2", wx.DefaultPosition, wx.DefaultSize, 0 )
        self.txt_info.Wrap( -1 )
        #self.txt_info.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_INFOBK ) )
        sizersta.Add( self.txt_info, 1, wx.ALIGN_BOTTOM|wx.BOTTOM|wx.LEFT|wx.RIGHT, 2 )
        self.pro_bar = wx.Gauge( stapanel, wx.ID_ANY, 100, wx.DefaultPosition, wx.Size( 100,15 ), wx.GA_HORIZONTAL )
        sizersta.Add( self.pro_bar, 0, wx.ALIGN_BOTTOM|wx.BOTTOM|wx.LEFT|wx.RIGHT, 2 )
        stapanel.SetSizer(sizersta)
        stapanel.SetDropTarget(FileDrop())
        sizer.Add(stapanel, 0, wx.EXPAND, 5 )
        self.SetSizer( sizer )

        self.Centre( wx.BOTH )
        self.Layout()
        self.Fit()
        self.update = False

        self.Bind(wx.EVT_CLOSE, self.on_close)
        thread = threading.Thread(None, self.hold, ())
        thread.setDaemon(True)
        thread.start()
项目:imagepy    作者:Image-Py    | 项目源码 | 文件源码
def __init__(self, parent ):
        wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, pos = wx.DefaultPosition, size = wx.Size(300,300), style = wx.TAB_TRAVERSAL )
        self.initBuffer()
        self.bindEvents()
        self.scaleidx = 4
        self.oldscale = 1
        self.o = (0,0)
        self.reInitBuffer = True
        self.resized = True
        self.ips = None
        self.scrsize = wx.DisplaySize()
        self.s = 0
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: Institution.__init__
        kwds["style"] = wx.CAPTION | wx.MAXIMIZE|wx.CLOSE_BOX | wx.MINIMIZE_BOX # | wx.FRAME_FLOAT_ON_PARENT | wx.TAB_TRAVERSAL
        wx.Dialog.__init__(self, *args, **kwds)
        self.label_1 = wx.StaticText(self, -1, "Institution Settings")
        self.label_2 = wx.StaticText(self, -1, "School Name")
        self.text_ctrl_5 = wx.TextCtrl(self, -1, "")#,style=wx.TE_READONLY)#wx.StaticText(self, -1, "")
        self.label_4 = wx.StaticText(self, -1, "School Code")
        self.text_ctrl_6 = wx.TextCtrl(self, -1, "")#,style=wx.TE_READONLY)#wx.StaticText(self, -1, "")
        self.label_6 = wx.StaticText(self, -1, "E-Mail")
        self.text_ctrl_1 = wx.TextCtrl(self, -1, "")#, style=wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB)
        self.label_7 = wx.StaticText(self, -1, "Phone")
        self.text_ctrl_2 = wx.TextCtrl(self, -1, "")#, style=wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB)
        self.label_8 = wx.StaticText(self, -1, "Place")
        self.text_ctrl_3 = wx.TextCtrl(self, -1, "")#, style=wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB)
        self.button_1 = wx.Button(self, -1, "Cancel")
        self.button_2 = wx.Button(self, -1, "Save")

        self.DB=db_operations()

        self.__set_properties()
        self.__do_layout()
        self.OnLoad()

        self.Bind(wx.EVT_TEXT, self.OnText, self.text_ctrl_1)
        self.Bind(wx.EVT_TEXT, self.OnText, self.text_ctrl_2)
        self.Bind(wx.EVT_TEXT, self.Ontext, self.text_ctrl_3)

        self.Bind(wx.EVT_BUTTON, self.OnCancel, self.button_1)
        self.Bind(wx.EVT_BUTTON, self.OnOk, self.button_2)


        # end wxGlade
项目: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):#(self, parent, id, title):

        kwds["style"] = wx.CAPTION | wx.CLOSE_BOX  | wx.STAY_ON_TOP | wx.FRAME_FLOAT_ON_PARENT | wx.TAB_TRAVERSAL

        wx.Dialog.__init__(self, *args, **kwds)
        #wx.Dialog.__init__(self, parent, id, title, size=(260, 200))

        self.ShowMe()
        self.Centre()
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: Institution.__init__
        kwds["style"] = wx.CAPTION | wx.CLOSE_BOX  | wx.STAY_ON_TOP | wx.FRAME_FLOAT_ON_PARENT | wx.TAB_TRAVERSAL
        wx.Dialog.__init__(self, *args, **kwds)
        self.label_1 = wx.StaticText(self, -1, "Institution Settings")
        self.label_2 = wx.StaticText(self, -1, "School Name")
        self.text_ctrl_5 = wx.TextCtrl(self, -1, "",style=wx.TE_READONLY)#wx.StaticText(self, -1, "")
        self.label_4 = wx.StaticText(self, -1, "School Code")
        self.text_ctrl_6 = wx.TextCtrl(self, -1, "",style=wx.TE_READONLY)#wx.StaticText(self, -1, "")
        self.label_6 = wx.StaticText(self, -1, "E-Mail")
        self.text_ctrl_1 = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_ENTER )
        self.label_7 = wx.StaticText(self, -1, "Contact")
        self.text_ctrl_2 = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_ENTER )
        self.label_8 = wx.StaticText(self, -1, "DEO")
        self.text_ctrl_3 = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_ENTER)
        self.button_1 = wx.Button(self, -1, "Cancel")
        self.button_2 = wx.Button(self, -1, "OK")

        self.DB=db_operations()

        self.__set_properties()
        self.__do_layout()
        self.OnLoad()

        self.Bind(wx.EVT_TEXT, self.OnText, self.text_ctrl_1)
        self.Bind(wx.EVT_TEXT, self.OnText, self.text_ctrl_2)
        self.Bind(wx.EVT_TEXT, self.Ontext, self.text_ctrl_3)

        self.Bind(wx.EVT_BUTTON, self.OnCancel, self.button_1)
        self.Bind(wx.EVT_BUTTON, self.OnOk, self.button_2)

        self.Bind(wx.EVT_CLOSE, self.OnClose)

        # end wxGlade
项目:pywatch    作者:jackburridge    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Frame.__init__(self, parent, id=wx.ID_ANY, title=u"Background Task", pos=wx.DefaultPosition,
                          size=wx.Size(500, 300), style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)

        self.SetSizeHintsSz(wx.DefaultSize, wx.DefaultSize)

        sizer = wx.BoxSizer(wx.VERTICAL)

        gb_sizer = wx.GridBagSizer(5, 5)
        gb_sizer.SetFlexibleDirection(wx.BOTH)
        gb_sizer.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.gauge = wx.Gauge(self, wx.ID_ANY, 10 ** 3, wx.DefaultPosition, wx.DefaultSize, wx.GA_HORIZONTAL)
        self.gauge.SetValue(0)
        gb_sizer.Add(self.gauge, wx.GBPosition(0, 0), wx.GBSpan(1, 1), wx.EXPAND, 0)

        self.button = wx.Button(self, wx.ID_ANY, u"Run", wx.DefaultPosition, wx.DefaultSize, 0)
        gb_sizer.Add(self.button, wx.GBPosition(1, 0), wx.GBSpan(1, 1), wx.EXPAND, 0)

        gb_sizer.AddGrowableCol(0)

        sizer.Add(gb_sizer, 1, wx.EXPAND | wx.ALL, 5)

        self.SetSizer(sizer)
        self.Layout()

        self.Centre(wx.BOTH)

        # Connect Events
        self.button.Bind(wx.EVT_BUTTON, self.on_run)
        self.model = WatchableDict()
        self.model["complete"] = 0
        pywatch.wx.ValueWatcher(self.gauge, self.model, "complete")


    # Virtual event handlers, overide them in your derived class
项目:pywatch    作者:jackburridge    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Frame.__init__(self, parent, id=wx.ID_ANY, title=u"Background Logging", pos=wx.DefaultPosition,
                          size=wx.Size(500, 300), style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)

        self.SetSizeHintsSz(wx.DefaultSize, wx.DefaultSize)

        sizer = wx.BoxSizer(wx.VERTICAL)

        gb_sizer = wx.GridBagSizer(5, 5)
        gb_sizer.SetFlexibleDirection(wx.BOTH)
        gb_sizer.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        list_boxChoices = []
        self.list_box = wx.ListBox(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, list_boxChoices, 0)
        gb_sizer.Add(self.list_box, wx.GBPosition(0, 0), wx.GBSpan(1, 1), wx.EXPAND, 0)

        self.button = wx.Button(self, wx.ID_ANY, u"Run", wx.DefaultPosition, wx.DefaultSize, 0)
        gb_sizer.Add(self.button, wx.GBPosition(1, 0), wx.GBSpan(1, 1), wx.EXPAND, 0)

        gb_sizer.AddGrowableCol(0)
        gb_sizer.AddGrowableRow(0)

        sizer.Add(gb_sizer, 1, wx.EXPAND | wx.ALL, 5)

        self.SetSizer(sizer)
        self.Layout()

        self.Centre(wx.BOTH)

        # Connect Events
        self.button.Bind(wx.EVT_BUTTON, self.on_run)

        self.model = WatchableDict()
        self.model["logs"] = []
        pywatch.wx.ItemContainerItemWatcher(self.list_box, self.model, "logs")



        # Virtual event handlers, overide them in your derived class
项目:BigBrotherBot-For-UrT43    作者:ptitbigorneau    | 项目源码 | 文件源码
def __init__( 
        self,  parent=None, id=-1, pos=wx.DefaultPosition, 
        size=wx.DefaultSize, 
        style=wx.TAB_TRAVERSAL|wx.NO_BORDER|wx.FULL_REPAINT_ON_RESIZE, 
        name='SquareMap', model = None,
        adapter = None,
        labels = True, # set to True to draw textual labels within the boxes
        highlight = True, # set to False to turn of highlighting
        padding = 2, # amount to reduce the children's box from the parent's box
    ):
        super( SquareMap, self ).__init__(
            parent, id, pos, size, style, name
        )
        self.model = model
        self.padding = padding
        self.labels = labels
        self.highlight = highlight
        self.selectedNode = None
        self.highlightedNode = None
        self.Bind( wx.EVT_PAINT, self.OnPaint)
        self.Bind( wx.EVT_SIZE, self.OnSize )
        if highlight:
            self.Bind( wx.EVT_MOTION, self.OnMouse )
        self.Bind( wx.EVT_LEFT_UP, self.OnClickRelease )
        self.Bind( wx.EVT_LEFT_DCLICK, self.OnDoubleClick )
        self.Bind( wx.EVT_KEY_UP, self.OnKeyUp )
        self.hot_map = []
        self.adapter = adapter or DefaultAdapter()
        self.DEFAULT_PEN = wx.Pen( wx.BLACK, 1, wx.SOLID )
        self.SELECTED_PEN = wx.Pen( wx.WHITE, 2, wx.SOLID )
        self.OnSize(None)
项目:fritzchecksum    作者:mementum    | 项目源码 | 文件源码
def __init__( self, parent ):
        wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"About", pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_DIALOG_STYLE )

        self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )

        bSizer8 = wx.BoxSizer( wx.VERTICAL )

        self.m_notebookAbout = wx.Notebook( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, 0 )
        self.m_panelAbout = wx.Panel( self.m_notebookAbout, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
        bSizer10 = wx.BoxSizer( wx.VERTICAL )


        bSizer10.AddSpacer( ( 0, 0), 1, wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL, 5 )

        self.m_staticTextAppNameVersion = wx.StaticText( self.m_panelAbout, wx.ID_ANY, u"MyLabel", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTRE )
        self.m_staticTextAppNameVersion.Wrap( -1 )
        bSizer10.Add( self.m_staticTextAppNameVersion, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )

        self.m_staticTextCopyright = wx.StaticText( self.m_panelAbout, wx.ID_ANY, u"MyLabel", wx.DefaultPosition, wx.DefaultSize, wx.ALIGN_CENTRE )
        self.m_staticTextCopyright.Wrap( -1 )
        bSizer10.Add( self.m_staticTextCopyright, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )

        self.m_hyperlinkURL = wx.HyperlinkCtrl( self.m_panelAbout, wx.ID_ANY, u"wxFB Website", u"http://www.wxformbuilder.org", wx.DefaultPosition, wx.DefaultSize, wx.HL_ALIGN_CENTRE|wx.HL_DEFAULT_STYLE )
        bSizer10.Add( self.m_hyperlinkURL, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )


        bSizer10.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )


        self.m_panelAbout.SetSizer( bSizer10 )
        self.m_panelAbout.Layout()
        bSizer10.Fit( self.m_panelAbout )
        self.m_notebookAbout.AddPage( self.m_panelAbout, u"About", True )

        bSizer8.Add( self.m_notebookAbout, 1, wx.EXPAND |wx.ALL, 5 )

        self.m_buttonClose = wx.Button( self, wx.ID_ANY, u"Close", wx.DefaultPosition, wx.DefaultSize, 0 )
        bSizer8.Add( self.m_buttonClose, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )


        self.SetSizer( bSizer8 )
        self.Layout()
        bSizer8.Fit( self )

        self.Centre( wx.BOTH )
项目:squaremap3    作者:kawaiicthulhu    | 项目源码 | 文件源码
def __init__(
        self,  parent=None, id=-1, pos=wx.DefaultPosition,
        size=wx.DefaultSize,
        style=wx.TAB_TRAVERSAL|wx.NO_BORDER|wx.FULL_REPAINT_ON_RESIZE,
        name='SquareMap', model = None,
        adapter = None,
        labels = True, 
        highlight = True,
        padding = 2,
        margin = 0,
        square_style = False,
    ):
        """Initialise the SquareMap

        adapter -- a DefaultAdapter or same-interface instance providing SquareMap data api
        labels -- set to True (default) to draw textual labels within the boxes
        highlight -- set to True (default) to highlight nodes on mouse-over 
        padding -- spacing within each square and its children (within the square's border)
        margin -- spacing around each square (on all sides)
        square_style -- use a more-recursive, less-linear, more "square" layout style which 
            works better on objects with large numbers of children, such as Meliae memory 
            dumps, works fine on profile views as well, but the layout is less obvious wrt 
            what node is "next" "previous" etc.
        """
        super( SquareMap, self ).__init__(
            parent, id, pos, size, style, name
        )
        self.model = model
        self.padding = padding
        self.square_style = square_style
        self.margin = margin
        self.labels = labels
        self.highlight = highlight
        self.selectedNode = None
        self.highlightedNode = None
        self._buffer = wx.Bitmap(20, 20) # Have a default buffer ready
        self.Bind( wx.EVT_PAINT, self.OnPaint)
        self.Bind( wx.EVT_SIZE, self.OnSize )
        if highlight:
            self.Bind( wx.EVT_MOTION, self.OnMouse )
        self.Bind( wx.EVT_LEFT_UP, self.OnClickRelease )
        self.Bind( wx.EVT_LEFT_DCLICK, self.OnDoubleClick )
        self.Bind( wx.EVT_KEY_UP, self.OnKeyUp )
        self.hot_map = []
        self.adapter = adapter or DefaultAdapter()
        self.DEFAULT_PEN = wx.Pen( wx.BLACK, 1, wx.SOLID )
        self.SELECTED_PEN = wx.Pen( wx.WHITE, 2, wx.SOLID )
        self.OnSize(None)
项目:Turrican2Editor    作者:GitExl    | 项目源码 | 文件源码
def __init__( self, parent ):
        wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"About", pos = wx.DefaultPosition, size = wx.Size( 800,512 ), style = wx.DEFAULT_DIALOG_STYLE )

        self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )

        Sizer = wx.BoxSizer( wx.VERTICAL )

        self.Panel = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
        SizerC1 = wx.BoxSizer( wx.VERTICAL )

        SizerText = wx.BoxSizer( wx.VERTICAL )

        self.AppName = wx.StaticText( self.Panel, wx.ID_ANY, u"Turrican 2 Editor", wx.DefaultPosition, wx.DefaultSize, 0 )
        self.AppName.Wrap( -1 )
        self.AppName.SetFont( wx.Font( wx.NORMAL_FONT.GetPointSize(), 70, 90, 92, False, wx.EmptyString ) )

        SizerText.Add( self.AppName, 0, wx.LEFT|wx.RIGHT|wx.TOP, 8 )

        self.AppVersion = wx.StaticText( self.Panel, wx.ID_ANY, u"Version 1.0.2", wx.DefaultPosition, wx.DefaultSize, 0 )
        self.AppVersion.Wrap( -1 )
        SizerText.Add( self.AppVersion, 0, wx.BOTTOM|wx.LEFT|wx.RIGHT, 8 )

        self.License = wx.TextCtrl( self.Panel, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.TE_DONTWRAP|wx.TE_MULTILINE|wx.TE_READONLY|wx.NO_BORDER )
        self.License.SetFont( wx.Font( 9, 75, 90, 90, False, "Courier New" ) )
        self.License.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) )

        SizerText.Add( self.License, 1, wx.ALL|wx.EXPAND, 8 )


        SizerC1.Add( SizerText, 1, wx.EXPAND, 5 )

        SizerButton = wx.BoxSizer( wx.HORIZONTAL )


        SizerButton.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 )

        self.Ok = wx.Button( self.Panel, wx.ID_ANY, u"Ok", wx.DefaultPosition, wx.DefaultSize, 0 )
        self.Ok.SetDefault()
        SizerButton.Add( self.Ok, 0, wx.ALIGN_RIGHT|wx.ALL, 5 )


        SizerC1.Add( SizerButton, 0, wx.EXPAND, 5 )


        self.Panel.SetSizer( SizerC1 )
        self.Panel.Layout()
        SizerC1.Fit( self.Panel )
        Sizer.Add( self.Panel, 1, wx.EXPAND |wx.ALL, 8 )


        self.SetSizer( Sizer )
        self.Layout()

        self.Centre( wx.BOTH )

        # Connect Events
        self.Ok.Bind( wx.EVT_BUTTON, self.ok )
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent, folder, filter=None, editable=True):
        wx.Panel.__init__(self, parent, style=wx.TAB_TRAVERSAL)

        main_sizer = wx.BoxSizer(wx.VERTICAL)

        self.Tree = wx.TreeCtrl(self,
                                style=(wx.TR_HAS_BUTTONS |
                                       wx.TR_SINGLE |
                                       wx.SUNKEN_BORDER |
                                       wx.TR_HIDE_ROOT |
                                       wx.TR_LINES_AT_ROOT |
                                       wx.TR_EDIT_LABELS))
        if wx.Platform == '__WXMSW__':
            self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.OnTreeItemExpanded, self.Tree)
            self.Tree.Bind(wx.EVT_LEFT_DOWN, self.OnTreeLeftDown)
        else:
            self.Bind(wx.EVT_TREE_ITEM_EXPANDED, self.OnTreeItemExpanded, self.Tree)
        self.Bind(wx.EVT_TREE_ITEM_COLLAPSED, self.OnTreeItemCollapsed, self.Tree)
        self.Bind(wx.EVT_TREE_BEGIN_LABEL_EDIT, self.OnTreeBeginLabelEdit, self.Tree)
        self.Bind(wx.EVT_TREE_END_LABEL_EDIT, self.OnTreeEndLabelEdit, self.Tree)
        main_sizer.AddWindow(self.Tree, 1, flag=wx.GROW)

        if filter is not None:
            self.Filter = wx.ComboBox(self, style=wx.CB_READONLY)
            self.Bind(wx.EVT_COMBOBOX, self.OnFilterChanged, self.Filter)
            main_sizer.AddWindow(self.Filter, flag=wx.GROW)
        else:
            self.Filter = None

        self.SetSizer(main_sizer)

        self.Folder = folder
        self.Editable = editable

        self.TreeImageList = wx.ImageList(16, 16)
        self.TreeImageDict = {}
        for item_type, bitmap in [(DRIVE, "tree_drive"),
                                  (FOLDER, "tree_folder"),
                                  (FILE, "tree_file")]:
            self.TreeImageDict[item_type] = self.TreeImageList.Add(GetBitmap(bitmap))
        self.Tree.SetImageList(self.TreeImageList)

        self.Filters = {}
        if self.Filter is not None:
            filter_parts = filter.split("|")
            for idx in xrange(0, len(filter_parts), 2):
                if filter_parts[idx + 1] == "*.*":
                    self.Filters[filter_parts[idx]] = ""
                else:
                    self.Filters[filter_parts[idx]] = filter_parts[idx + 1].replace("*", "")
                self.Filter.Append(filter_parts[idx])
                if idx == 0:
                    self.Filter.SetStringSelection(filter_parts[idx])

            self.CurrentFilter = self.Filters[self.Filter.GetStringSelection()]
        else:
            self.CurrentFilter = ""
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: sampoorna_win.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=0)
        self.login_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_login = wx.Panel(self.login_pane, wx.ID_ANY)
        self.label_1 = wx.StaticText(self.panel_login, wx.ID_ANY, _("Warning: Always backup your database before you proceed to avoid potential data loss !!!"))
        self.label_2 = wx.StaticText(self.panel_login, wx.ID_ANY, _("This software does not save Sampoorna credentials. It is used for one time login"))
        self.panel_1 = wx.Panel(self.panel_login, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.TAB_TRAVERSAL)
        self.label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Sampoorna Username"))
        self.text_ctrl_user = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.NO_BORDER)
        self.label_4 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Sampoorna Password"))
        self.text_ctrl_passw = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PASSWORD | wx.NO_BORDER)
        self.button_next = wx.Button(self.panel_login, wx.ID_ANY, _("Next >>"))
        self.standard_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_3 = wx.Panel(self.standard_pane, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.STATIC_BORDER | wx.TAB_TRAVERSAL)
        self.checkbox_8 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("8 Standard"))
        self.checkbox_9 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("9 Standard"))
        self.checkbox_10 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("10 Standard"))
        self.button_next_copy_copy = wx.Button(self.standard_pane, wx.ID_ANY, _("<<Previous"))
        self.button_next_copy = wx.Button(self.standard_pane, wx.ID_ANY, _("Proceed >>"))
        self.report_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_2 = wx.Panel(self.report_pane, wx.ID_ANY)
        self.label_7 = wx.StaticText(self.panel_2, wx.ID_ANY, _("Progress"))
        self.progresss_total = wx.TextCtrl(self.panel_2, wx.ID_ANY, "")
        self.progress_each = wx.TextCtrl(self.panel_2, wx.ID_ANY, "")
        self.label_satus = wx.StaticText(self.panel_2, wx.ID_ANY, _("Status"))
        self.text_ctrl_1 = wx.TextCtrl(self.panel_2, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL | wx.NO_BORDER)
        self.button_finished = wx.Button(self.panel_2, wx.ID_ANY, _("Finished"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_TEXT_ENTER, self.on_password_enter, self.text_ctrl_passw)
        self.Bind(wx.EVT_BUTTON, self.on_next, self.button_next)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_8)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_9)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_10)
        self.Bind(wx.EVT_BUTTON, self.on_previous, self.button_next_copy_copy)
        self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_next_copy)
        self.Bind(wx.EVT_BUTTON, self.on_finished, self.button_finished)
        # end wxGlade
项目: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: sampoorna_win.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=0)
        self.login_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_login = wx.Panel(self.login_pane, wx.ID_ANY)
        self.label_1 = wx.StaticText(self.panel_login, wx.ID_ANY, _("Warning: Always backup your database before you proceed to avoid potential data loss !!!"))
        self.label_2 = wx.StaticText(self.panel_login, wx.ID_ANY, _("This software does not save Sampoorna credentials. It is used for one time login"))
        self.panel_1 = wx.Panel(self.panel_login, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.TAB_TRAVERSAL)
        self.label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Sampoorna Username"))
        self.text_ctrl_user = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.NO_BORDER)
        self.label_4 = wx.StaticText(self.panel_1, wx.ID_ANY, _("Sampoorna Password"))
        self.text_ctrl_passw = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PASSWORD | wx.NO_BORDER)
        self.button_next = wx.Button(self.panel_login, wx.ID_ANY, _("Next >>"))
        self.standard_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_3 = wx.Panel(self.standard_pane, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.STATIC_BORDER | wx.TAB_TRAVERSAL)
        self.checkbox_8 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("8 Standard"))
        self.checkbox_9 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("9 Standard"))
        self.checkbox_10 = wx.CheckBox(self.panel_3, wx.ID_ANY, _("10 Standard"))
        self.button_previous = wx.Button(self.standard_pane, wx.ID_ANY, _("<<Previous"))
        self.button_proceed = wx.Button(self.standard_pane, wx.ID_ANY, _("Proceed >>"))
        self.report_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_2 = wx.Panel(self.report_pane, wx.ID_ANY)
        self.label_7 = wx.StaticText(self.panel_2, wx.ID_ANY, _("Progress"))
        self.progresss_total = wx.Gauge(self.panel_2, wx.ID_ANY, range=100)
        self.progress_each = wx.Gauge(self.panel_2, wx.ID_ANY, range=100)
        self.label_satus = wx.StaticText(self.panel_2, wx.ID_ANY, _("Status"))
        self.list_ctrl_1 = wx.ListCtrl(self.panel_2, wx.ID_ANY, style=wx.LC_REPORT | wx.LC_ALIGN_LEFT | wx.SUNKEN_BORDER | wx.NO_BORDER)
        self.button_finished = wx.Button(self.panel_2, wx.ID_ANY, _("Finished"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_passw)
        self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_user)
        self.Bind(wx.EVT_BUTTON, self.on_next, self.button_next)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_8)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_9)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_10)
        self.Bind(wx.EVT_BUTTON, self.on_previous, self.button_previous)
        self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed)
        self.Bind(wx.EVT_BUTTON, self.on_finished, self.button_finished)

        # create a pubsub receiver
        Publisher().subscribe(self.updateDisplay, "update")
        # end wxGlade
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: sampoorna_win.__init__
        kwds["style"] = wx.DEFAULT_FRAME_STYLE
        wx.Dialog.__init__(self, *args, **kwds)
        self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=0)
        self.login_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_login = wx.Panel(self.login_pane, wx.ID_ANY)
        self.label_1 = wx.StaticText(self.panel_login, wx.ID_ANY, ("Warning: Always backup your database before you proceed to avoid potential data loss !!!"))
        self.label_2 = wx.StaticText(self.panel_login, wx.ID_ANY, ("This software does not save Sampoorna credentials. It is used for one time login"))
        self.panel_1 = wx.Panel(self.panel_login, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.TAB_TRAVERSAL)
        self.label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Sampoorna Username"))
        self.text_ctrl_user = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.NO_BORDER)
        self.label_4 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Sampoorna Password"))
        self.text_ctrl_passw = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PASSWORD | wx.NO_BORDER)
        self.button_next = wx.Button(self.panel_login, wx.ID_ANY, ("Next >>"))
        self.standard_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_3 = wx.Panel(self.standard_pane, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.STATIC_BORDER | wx.TAB_TRAVERSAL)
        self.checkbox_8 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("8 Standard"))
        self.checkbox_9 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("9 Standard"))
        self.checkbox_10 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("10 Standard"))
        self.button_previous = wx.Button(self.standard_pane, wx.ID_ANY, ("<<Previous"))
        self.button_proceed = wx.Button(self.standard_pane, wx.ID_ANY, ("Proceed >>"))
        self.report_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_2 = wx.Panel(self.report_pane, wx.ID_ANY)
        self.label_7 = wx.StaticText(self.panel_2, wx.ID_ANY, ("Progress"))
        self.progresss_total = wx.Gauge(self.panel_2, wx.ID_ANY, range=100)
        self.label_progress_perc =  wx.StaticText(self.panel_2, wx.ID_ANY, (""))
        self.label_satus = wx.StaticText(self.panel_2, wx.ID_ANY, ("Status"))
        #self.list_ctrl_1 = wx.ListCtrl(self.panel_2, wx.ID_ANY, style=wx.LC_REPORT | wx.LC_ALIGN_LEFT | wx.SUNKEN_BORDER | wx.NO_BORDER)
        self.text_ctrl_report = wx.TextCtrl(self.panel_2, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL | wx.NO_BORDER)

        self.button_finished = wx.Button(self.panel_2, wx.ID_ANY, ("Abort"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_passw)
        self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_user)
        self.Bind(wx.EVT_BUTTON, self.on_next, self.button_next)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_8)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_9)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_10)
        self.Bind(wx.EVT_BUTTON, self.on_previous, self.button_previous)
        self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed)
        self.Bind(wx.EVT_BUTTON, self.on_finished, self.button_finished)

        # create a pubsub receiver
        Publisher().subscribe(self.update_display, "update")
        Publisher().subscribe(self.final_report, "report")
        Publisher().subscribe(self.update_progress_bar, "progress_bar")
        Publisher().subscribe(self.update_current_class, "change_class")

        # 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
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: sampoorna_win.__init__
        kwds["style"] = wx.CAPTION | wx.CLOSE_BOX |  wx.MAXIMIZE | wx.MAXIMIZE_BOX | wx.SYSTEM_MENU | wx.RESIZE_BORDER | wx.CLIP_CHILDREN
        wx.Dialog.__init__(self, *args, **kwds)
        self.notebook_1 = wx.Notebook(self, wx.ID_ANY, style=0)
        self.login_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_login = wx.Panel(self.login_pane, wx.ID_ANY)
        self.label_1 = wx.StaticText(self.panel_login, wx.ID_ANY, ("Warning: Always backup your database before you proceed to avoid potential data loss !!!"))
        self.label_2 = wx.StaticText(self.panel_login, wx.ID_ANY, ("This software does not save Sampoorna username or password. It is used for one time login"))
        self.panel_1 = wx.Panel(self.panel_login, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.TAB_TRAVERSAL)
        self.label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Sampoorna Username"))
        self.text_ctrl_user = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.NO_BORDER)
        self.label_4 = wx.StaticText(self.panel_1, wx.ID_ANY, ("Sampoorna Password"))
        self.text_ctrl_passw = wx.TextCtrl(self.panel_1, wx.ID_ANY, "", style=wx.TE_PROCESS_ENTER | wx.TE_PASSWORD | wx.NO_BORDER)
        self.button_next = wx.Button(self.panel_login, wx.ID_ANY, ("Next >>"))
        self.standard_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_3 = wx.Panel(self.standard_pane, wx.ID_ANY, style=wx.SUNKEN_BORDER | wx.RAISED_BORDER | wx.STATIC_BORDER | wx.TAB_TRAVERSAL)
        self.checkbox_8 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("8 Standard"))
        self.checkbox_9 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("9 Standard"))
        self.checkbox_10 = wx.CheckBox(self.panel_3, wx.ID_ANY, ("10 Standard"))
        self.button_previous = wx.Button(self.standard_pane, wx.ID_ANY, ("<<Previous"))
        self.button_proceed = wx.Button(self.standard_pane, wx.ID_ANY, ("Proceed >>"))
        self.report_pane = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.panel_2 = wx.Panel(self.report_pane, wx.ID_ANY)
        self.label_7 = wx.StaticText(self.panel_2, wx.ID_ANY, ("Progress"))
        self.progresss_total = wx.Gauge(self.panel_2, wx.ID_ANY, range=100)
        self.progress_each =wx.StaticText(self.panel_2, wx.ID_ANY)# wx.TextCtrl(self.panel_2, wx.ID_ANY, "", style=wx.TE_READONLY)
        self.label_satus = wx.StaticText(self.panel_2, wx.ID_ANY, ("Status"))
        self.text_ctrl_report = wx.TextCtrl(self.panel_2, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY | wx.HSCROLL | wx.NO_BORDER)
        self.button_finished = wx.Button(self.panel_2, wx.ID_ANY, ("Abort"))

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_passw)
        self.Bind(wx.EVT_TEXT, self.on_user_pass_text, self.text_ctrl_user)
        self.Bind(wx.EVT_BUTTON, self.on_next, self.button_next)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_8)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_9)
        self.Bind(wx.EVT_CHECKBOX, self.on_check, self.checkbox_10)
        self.Bind(wx.EVT_BUTTON, self.on_previous, self.button_previous)
        self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_proceed)
        self.Bind(wx.EVT_BUTTON, self.on_finished, self.button_finished)
        # end wxGlade


        # create a pubsub receiver
        Publisher().subscribe(self.update_display, "update")
        Publisher().subscribe(self.final_report, "report")
        Publisher().subscribe(self.update_progress_bar, "progress_bar")
        Publisher().subscribe(self.update_current_class, "change_class")
项目:pywatch    作者:jackburridge    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Frame.__init__(self, parent, id=wx.ID_ANY, title=u"Selection Frame", pos=wx.DefaultPosition,
                          size=wx.Size(500, 300), style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)
        self.model = WatchableDict()
        self.model["selection"] = 1
        self.model["list"] = [u"One", u"Two", u"Three"]
        self.SetSizeHintsSz(wx.DefaultSize, wx.DefaultSize)

        sizer = wx.BoxSizer(wx.VERTICAL)

        gb_sizer = wx.GridBagSizer(5, 5)
        gb_sizer.SetFlexibleDirection(wx.BOTH)
        gb_sizer.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        choices = []
        self.combo_box = wx.ComboBox(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize,
                                     choices, 0)
        gb_sizer.Add(self.combo_box, wx.GBPosition(0, 0), wx.GBSpan(1, 1), wx.EXPAND, 5)
        pywatch.wx.ItemContainerItemWatcher(self.combo_box, self.model, "list")
        pywatch.wx.SelectionChanger(self.combo_box, self.model, "selection")

        self.choice = wx.Choice(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, choices, 0)
        self.choice.SetSelection(0)
        gb_sizer.Add(self.choice, wx.GBPosition(1, 0), wx.GBSpan(1, 1), wx.EXPAND, 5)
        pywatch.wx.ItemContainerItemWatcher(self.choice, self.model, "list")
        pywatch.wx.SelectionChanger(self.choice, self.model, "selection")

        self.list_box = wx.ListBox(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, choices, 0)
        gb_sizer.Add(self.list_box, wx.GBPosition(2, 0), wx.GBSpan(1, 1), wx.EXPAND, 5)
        pywatch.wx.ItemContainerItemWatcher(self.list_box, self.model, "list")
        pywatch.wx.SelectionChanger(self.list_box, self.model, "selection")

        self.radio_box = wx.RadioBox(self, wx.ID_ANY, u"Radio Box", wx.DefaultPosition, wx.DefaultSize,
                                     [u"One", u"Two", u"Three"], 1, wx.RA_SPECIFY_COLS)
        self.radio_box.SetSelection(0)
        gb_sizer.Add(self.radio_box, wx.GBPosition(3, 0), wx.GBSpan(1, 1), wx.EXPAND, 5)
        pywatch.wx.SelectionChanger(self.radio_box, self.model, "selection")


        gb_sizer.AddGrowableCol(0)
        gb_sizer.AddGrowableRow(2)

        sizer.Add(gb_sizer, 1, wx.EXPAND | wx.ALL, 5)

        self.SetSizer(sizer)
        self.Layout()

        self.Centre(wx.BOTH)
项目:pywatch    作者:jackburridge    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Frame.__init__(self, parent, id=wx.ID_ANY, title=u"List Editor", pos=wx.DefaultPosition,
                          size=wx.Size(500, 300), style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)

        self.SetSizeHintsSz(wx.DefaultSize, wx.DefaultSize)

        sizer = wx.BoxSizer(wx.VERTICAL)

        gb_sizer = wx.GridBagSizer(5, 5)
        gb_sizer.SetFlexibleDirection(wx.BOTH)
        gb_sizer.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        list_boxChoices = []
        self.list_box = wx.ListBox(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, list_boxChoices, 0)
        gb_sizer.Add(self.list_box, wx.GBPosition(0, 0), wx.GBSpan(1, 2), wx.EXPAND, 0)

        self.add_button = wx.Button(self, wx.ID_ANY, u"Add", wx.DefaultPosition, wx.DefaultSize, 0)
        gb_sizer.Add(self.add_button, wx.GBPosition(1, 0), wx.GBSpan(1, 1), wx.EXPAND, 0)

        self.remove_button = wx.Button(self, wx.ID_ANY, u"Remove", wx.DefaultPosition, wx.DefaultSize, 0)
        gb_sizer.Add(self.remove_button, wx.GBPosition(1, 1), wx.GBSpan(1, 1), wx.EXPAND, 0)

        self.text_ctrl = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0)
        gb_sizer.Add(self.text_ctrl, wx.GBPosition(2, 0), wx.GBSpan(1, 2), wx.EXPAND, 0)

        gb_sizer.AddGrowableCol(0)
        gb_sizer.AddGrowableCol(1)
        gb_sizer.AddGrowableRow(0)

        sizer.Add(gb_sizer, 1, wx.EXPAND | wx.ALL, 5)

        self.SetSizer(sizer)
        self.Layout()

        self.Centre(wx.BOTH)

        self.add_button.Bind(wx.EVT_BUTTON, self.on_add)
        self.remove_button.Bind(wx.EVT_BUTTON, self.on_remove)

        self.model = WatchableDict()
        self.model["list"] = ["one", "two", "three", "four"]
        self.model["selection"] = 0

        pywatch.wx.ItemContainerItemWatcher(self.list_box, self.model, "list")
        pywatch.wx.SelectionChanger(self.list_box, self.model, "selection")

        def getter():
            return self.model["list"][self.model["selection"]]

        def setter(value):
            self.model["list"][self.model["selection"]] = value

        pywatch.wx.ValueChanger(self.text_ctrl, self.model, ("list", "selection", setter, getter))
项目:pywatch    作者:jackburridge    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Frame.__init__(self, parent, id=wx.ID_ANY, title=u"List Frame", pos=wx.DefaultPosition,
                          size=wx.Size(500, 300), style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)

        self.SetSizeHintsSz(wx.DefaultSize, wx.DefaultSize)

        sizer = wx.BoxSizer(wx.VERTICAL)

        gb_sizer = wx.GridBagSizer(5, 5)
        gb_sizer.SetFlexibleDirection(wx.BOTH)
        gb_sizer.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        list_boxChoices = []
        self.list_box = wx.ListBox(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, list_boxChoices, 0)
        gb_sizer.Add(self.list_box, wx.GBPosition(0, 0), wx.GBSpan(1, 2), wx.EXPAND, 0)

        combo_boxChoices = []
        self.combo_box = wx.ComboBox(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize,
                                     combo_boxChoices, 0)
        gb_sizer.Add(self.combo_box, wx.GBPosition(1, 0), wx.GBSpan(1, 2), wx.EXPAND, 0)

        choiceChoices = []
        self.choice = wx.Choice(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, choiceChoices, 0)
        self.choice.SetSelection(0)
        gb_sizer.Add(self.choice, wx.GBPosition(2, 0), wx.GBSpan(1, 2), wx.EXPAND, 0)

        self.text_ctrl = wx.TextCtrl(self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize,
                                     wx.TE_PROCESS_ENTER)
        gb_sizer.Add(self.text_ctrl, wx.GBPosition(3, 0), wx.GBSpan(1, 1), wx.EXPAND, 0)

        self.button = wx.Button(self, wx.ID_ANY, u"Add", wx.DefaultPosition, wx.DefaultSize, 0)
        gb_sizer.Add(self.button, wx.GBPosition(3, 1), wx.GBSpan(1, 1), wx.ALL, 0)

        gb_sizer.AddGrowableCol(0)
        gb_sizer.AddGrowableRow(0)

        sizer.Add(gb_sizer, 1, wx.EXPAND | wx.ALL, 5)

        self.SetSizer(sizer)
        self.Layout()

        self.Centre(wx.BOTH)

        # Connect Events
        self.button.Bind(wx.EVT_BUTTON, self.on_add)
        self.text_ctrl.Bind(wx.EVT_TEXT_ENTER, self.on_add)

        self.model = WatchableDict()
        self.model["list"] = []
        self.model["text"] = ""
        pywatch.wx.ValueChanger(self.text_ctrl, self.model, "text")
        pywatch.wx.ItemContainerItemWatcher(self.list_box, self.model, "list")
        pywatch.wx.ItemContainerItemWatcher(self.choice, self.model, "list")
        pywatch.wx.ItemContainerItemWatcher(self.combo_box, self.model, "list")

    # Virtual event handlers, overide them in your derived class
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def __init__(self, parent, *args, **kwargs):#id=-1,
                 #pos = wx.DefaultPosition, size = wx.DefaultSize,
                 #style = 0, name="multiSplitter", borderSize = 2,
            #    borderColor=(0,0,0), sashColor=(0,0,0)):

        # always turn on tab traversal
        style = wx.TAB_TRAVERSAL
        # and turn off any border styles
        style &= ~wx.BORDER_MASK
        style |= wx.BORDER_NONE

        # initialize the base class
        wx.Panel.__init__(self, parent, *args, **kwargs)#id, pos, size, style, name)
        self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM)

        # initialize data members
        self._windows = []
        self._sashes = []
        self._permitUnsplitAlways = self.HasFlag(wx.SP_PERMIT_UNSPLIT)

        self._dragMode = wx.SPLIT_DRAG_NONE
        self._working_sash = -1
        self.__absolute_sash_pos = 0
        self._oldY = 0
        self._checkRequestedSashPosition = False
        self._minimumPaneSize = 0

        self._sashCursorWE = wx.Cursor(wx.CURSOR_SIZEWE)

        self._needUpdating = False
        self._isHot = False
        self._drawSashInBackgroundColour = False

        # Bind event handlers
        self.Bind(wx.EVT_PAINT,        self._OnPaint)
        self.Bind(wx.EVT_IDLE,         self._OnIdle)
        self.Bind(wx.EVT_SIZE,         self._OnSize)
        self.Bind(wx.EVT_MOUSE_EVENTS, self._OnMouse)

        # Novas variaveis
        #self._old_size = (0,0)
        self._sash_size = self._border_size = 1
        self.borderColor = (0,0,0)
        self.sashColor = (0,0,0)
        #self.selectedWindowColor = 'green'
        self.trackerCanvas = None
        self.fit = False
        self._ajustes = []
        self._proporcao = []
        self.ajustado = False

        # Tom de azul para sashTrcker
        self.sashTrackerColor = 'blue' #(4, 20, 164)