我们从Python开源项目中,提取了以下28个代码示例,用于说明如何使用wx.CAPTION。
def __init__(self): wx.Frame.__init__(self, None, pos=wx.DefaultPosition, size=wx.Size(450, 100), style=wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX | wx.CLIP_CHILDREN, title="BRUNO") panel = wx.Panel(self) ico = wx.Icon('boy.ico', wx.BITMAP_TYPE_ICO) self.SetIcon(ico) my_sizer = wx.BoxSizer(wx.VERTICAL) lbl = wx.StaticText(panel, label="Bienvenido Sir. How can I help you?") my_sizer.Add(lbl, 0, wx.ALL, 5) self.txt = wx.TextCtrl(panel, style=wx.TE_PROCESS_ENTER, size=(400, 30)) self.txt.SetFocus() self.txt.Bind(wx.EVT_TEXT_ENTER, self.OnEnter) my_sizer.Add(self.txt, 0, wx.ALL, 5) panel.SetSizer(my_sizer) self.Show() speak.Speak('''Welcome back Sir, Broono at your service.''')
def __init__(self, *args, **kwds): # begin wxGlade: Add_Student.__init__ kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX | wx.STAY_ON_TOP wx.Dialog.__init__(self, *args, **kwds) self.text_ctrl_1 = wx.TextCtrl(self, -1, "") self.text_ctrl_2 = wx.TextCtrl(self, -1, "") self.text_ctrl_3 = wx.TextCtrl(self, -1, "") self.button_1 = wx.Button(self, -1, "Add") self.Bind(wx.EVT_CLOSE,self.OnClose,self) self.__set_properties() self.__do_layout() self.DB=db_operations() self.success=False self.STUDENT_INFO=[] # end wxGlade
def __init__(self, *args, **kwds): # begin wxGlade: MyDialog.__init__ #args[ kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.STAY_ON_TOP wx.Dialog.__init__(self, *args, **kwds) self.text_ctrl_passwd = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_PASSWORD) self.button_cancel = wx.Button(self, wx.ID_ANY, _("Cancel")) self.button_ok = wx.Button(self, wx.ID_ANY, _("OK")) self.__set_properties() self.__do_layout() self.password_text='' self.Bind(wx.EVT_TEXT, self.on_passwod, self.text_ctrl_passwd) self.Bind(wx.EVT_BUTTON, self.on_button_cancel, self.button_cancel) self.Bind(wx.EVT_BUTTON, self.on_button_ok, self.button_ok) self.cancelled=False # end wxGlade
def __init__(self): wx.Frame.__init__(self, None, pos=wx.DefaultPosition, size=wx.Size(450, 100), style=wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX | wx.CLIP_CHILDREN, title='KIARA') panel = wx.Panel(self) my_sizer = wx.BoxSizer(wx.VERTICAL) lbl = wx.StaticText(panel, label='''Hello I\'m Kiara the Python Digital Assistant. How can I help you?''') my_sizer.Add(lbl, 0, wx.ALL, 5) self.txt = wx.TextCtrl(panel, style=wx.TE_PROCESS_ENTER, size=(400, 30)) self.txt.SetFocus() self.txt.Bind(wx.EVT_TEXT_ENTER, self.OnEnter) my_sizer.Add(self.txt, 0, wx.ALL, 5) panel.SetSizer(my_sizer) self.Show() speak('Welcome my friend. I am Kiara. How can I help ?')
def __init__(self, parent=None, message='Message:', caption='Message', style=wx.OK|wx.CANCEL,pos=wx.DefaultPosition): wx.Dialog.__init__(self, parent, -1, caption, size=wx.DefaultSize, style=wx.CAPTION, pos=pos) self._build(message, style) self.Fit()
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))
def check_for_update(self): def find_update(): logging.debug("Checking remote for new updates.") try: gh = GitHub() repo = gh.repository("phac-nml", "irida-miseq-uploader") # get the latest tag from github return next(repo.iter_tags(number=1)) except: logging.warn("Couldn't reach github to check for new version.") raise def handle_update(result): latest_tag = result.get() logging.debug("Found latest version: [{}]".format(latest_tag)) release_url = self.url + "/releases/latest" if LooseVersion(self.__app_version__) < LooseVersion(latest_tag.name): logging.info("Newer version found.") dialog = NewVersionMessageDialog( parent=None, id=wx.ID_ANY, message=("A new version of the IRIDA MiSeq " "Uploader tool is available. You can" " download the latest version from "), title="IRIDA MiSeq Uploader update available", download_url=release_url, style=wx.CAPTION|wx.CLOSE_BOX|wx.STAY_ON_TOP) dialog.ShowModal() dialog.Destroy() else: logging.debug("No new versions found.") dr.startWorker(handle_update, find_update)
def __init__(self, *args, **kwds): # begin wxGlade: working_days.__init__ kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX wx.Frame.__init__(self, *args, **kwds) self.label_1 = wx.StaticText(self, -1, "Year") self.combo_box_1 = wx.ComboBox(self, -1, choices=[ ], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY) self.label_5 = wx.StaticText(self, -1, "Total Working Days") self.label_2 = wx.StaticText(self, -1, " Term I") self.text_ctrl_1 = wx.TextCtrl(self, -1, "") self.label_3 = wx.StaticText(self, -1, "Term II") self.text_ctrl_2 = wx.TextCtrl(self, -1, "") self.label_4 = wx.StaticText(self, -1, "Final") self.text_ctrl_3 = wx.TextCtrl(self, -1, "") self.button_1 = wx.Button(self, -1, "Cancel") self.button_2 = wx.Button(self, -1, "Save") self.button_2.Enabled=False self.combo_box_1.SetSelection(0) self.DB=db_operations() self.__set_properties() self.__do_layout() self.YEAR='Select' self.Bind(wx.EVT_COMBOBOX, self.OnCombo, self.combo_box_1) self.Bind(wx.EVT_BUTTON, self.OnCancel, self.button_1) self.Bind(wx.EVT_BUTTON, self.OnSave, self.button_2) self.load_year() self.OnLoad() # end wxGlade
def __init__(self, *args, **kwds): # begin wxGlade: Login.__init__ kwds["style"] = wx.ICONIZE | wx.CAPTION | wx.MINIMIZE | wx.CLOSE_BOX | wx.MINIMIZE_BOX wx.Frame.__init__(self, *args, **kwds) self.label_1 = wx.StaticText(self, -1, "Username") self.combo_box_1 = wx.ComboBox(self, -1, choices=["Select", "admin", "teacher"], style=wx.CB_DROPDOWN) self.label_2 = wx.StaticText(self, -1, "Password") self.text_ctrl_1 = wx.TextCtrl(self, -1, "", style=wx.TE_PROCESS_TAB | wx.TE_PASSWORD) self.button_1 = wx.Button(self, -1, "Cancel") self.button_2 = wx.Button(self, -1, "Login") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_COMBOBOX, self.OnCombo_Change, self.combo_box_1) self.Bind(wx.EVT_BUTTON, self.OnCancel_Click, self.button_1) self.Bind(wx.EVT_BUTTON, self.OnLogin_Click, self.button_2) self.Bind(wx.EVT_TEXT,self.OnText_Change,self.text_ctrl_1) #self.Bind(wx.EVT_KEY_DOWN,self.OnKeyPress,self.text_ctrl_1) self.Bind(wx.EVT_CLOSE,self.on_close,self) self.text_ctrl_1.Bind(wx.EVT_KEY_DOWN, self.OnKeyPress) self.UO=user_operations(self) # DB Connection obj # end wxGlade
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
def __init__(self, *args, **kwds): # begin wxGlade: chng_pass.__init__ kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX wx.Dialog.__init__(self, *args, **kwds) self.label_3 = wx.StaticText(self, -1, "Username") self.combo_box_1 = wx.ComboBox(self, -1, choices=['Select','admin','teacher'], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY) self.label_4 = wx.StaticText(self, -1, "Current Password") self.text_ctrl_1 = wx.TextCtrl(self, -1, "", style=wx.TE_PASSWORD) self.label_5 = wx.StaticText(self, -1, "New Password") self.text_ctrl_2 = wx.TextCtrl(self, -1, "", style=wx.TE_PASSWORD) self.label_6 = wx.StaticText(self, -1, "Confirm New Password") self.text_ctrl_3 = wx.TextCtrl(self, -1, "", style=wx.TE_PASSWORD) self.button_1 = wx.Button(self, -1, "Cancel") self.button_2 = wx.Button(self, -1, "Save") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_COMBOBOX, self.on_combo, self.combo_box_1) self.Bind(wx.EVT_TEXT, self.on_password_1, self.text_ctrl_1) self.Bind(wx.EVT_TEXT, self.on_password_2, self.text_ctrl_2) self.Bind(wx.EVT_TEXT, self.on_password_3, self.text_ctrl_3) self.Bind(wx.EVT_BUTTON, self.on_cancel, self.button_1) self.Bind(wx.EVT_BUTTON, self.on_save, self.button_2) self.UO=user_operations(self) # end wxGlade
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
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
def __init__(self, *args, **kwds): # begin wxGlade: working_days.__init__ kwds["style"] = wx.CAPTION | wx.CLOSE_BOX wx.Dialog.__init__(self, *args, **kwds) self.label_1 = wx.StaticText(self, -1, "Year") self.combo_box_1 = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY) self.label_5 = wx.StaticText(self, -1, "Total Working Days") self.label_2 = wx.StaticText(self, -1, " Term I") self.text_ctrl_1 = wx.TextCtrl(self, -1, "") self.label_3 = wx.StaticText(self, -1, "Term II") self.text_ctrl_2 = wx.TextCtrl(self, -1, "") self.label_4 = wx.StaticText(self, -1, "Final") self.text_ctrl_3 = wx.TextCtrl(self, -1, "") self.button_1 = wx.Button(self, -1, "Close") self.button_2 = wx.Button(self, -1, "Save") self.button_2.Enabled=False self.combo_box_1.SetSelection(0) self.DB=db_operations() self.load_year() self.__set_properties() self.__do_layout() self.YEAR='Select' self.Bind(wx.EVT_COMBOBOX, self.OnCombo, self.combo_box_1) self.Bind(wx.EVT_BUTTON, self.OnCancel, self.button_1) self.Bind(wx.EVT_BUTTON, self.OnSave, self.button_2) self.OnLoad() self.Bind(wx.EVT_CLOSE, self.OnClose) # end wxGlade
def __init__(self, *args, **kwds): # begin wxGlade: MyDialog.__init__ kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.STAY_ON_TOP wx.Dialog.__init__(self, *args, **kwds) self.text_ctrl_passwd = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_PASSWORD) self.button_cancel = wx.Button(self, wx.ID_ANY, _("Cancel")) self.button_ok = wx.Button(self, wx.ID_ANY, _("OK")) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_TEXT, self.on_passwod, self.text_ctrl_passwd) self.Bind(wx.EVT_BUTTON, self.on_button_cancel, self.button_cancel) self.Bind(wx.EVT_BUTTON, self.on_button_ok, self.button_ok) # end wxGlade
def OnInit(self): w = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_X) h = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_Y) frame = MainFrame(None, -1, "", (w / 2 - 200, h / 2 - 50), style = wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX) self.SetTopWindow(frame) frame.Show() return True
def __init__(self): """Constructor""" no_sys_menu = wx.CAPTION wx.Frame.__init__(self, None, title="No System Menu", style=no_sys_menu) panel = wx.Panel(self) self.Show()
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()
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()
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()
def __init__( self, parent ): wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = u"Teardrops", pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.CAPTION|wx.CLOSE_BOX|wx.DEFAULT_DIALOG_STYLE ) self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize ) bvs_main = wx.BoxSizer( wx.VERTICAL ) rbx_actionChoices = [ u"Set Teardrops", u"Remove All Teardrops" ] self.rbx_action = wx.RadioBox( self, wx.ID_ANY, u"Action", wx.DefaultPosition, wx.DefaultSize, rbx_actionChoices, 1, wx.RA_SPECIFY_ROWS ) self.rbx_action.SetSelection( 0 ) bvs_main.Add( self.rbx_action, 0, wx.ALL, 5 ) gs_params = wx.GridSizer( 0, 2, 0, 0 ) self.st_hpercent = wx.StaticText( self, wx.ID_ANY, u"Horizontal percent", wx.DefaultPosition, wx.DefaultSize, 0 ) self.st_hpercent.Wrap( -1 ) gs_params.Add( self.st_hpercent, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 ) self.sp_hpercent = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 30 ) gs_params.Add( self.sp_hpercent, 0, wx.ALL|wx.SHAPED, 5 ) self.st_vpercent = wx.StaticText( self, wx.ID_ANY, u"Vertical percent", wx.DefaultPosition, wx.DefaultSize, 0 ) self.st_vpercent.Wrap( -1 ) gs_params.Add( self.st_vpercent, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 ) self.sp_vpercent = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 0, 100, 70 ) gs_params.Add( self.sp_vpercent, 0, wx.ALL|wx.SHAPED, 5 ) self.st_nbseg = wx.StaticText( self, wx.ID_ANY, u"Number of segments", wx.DefaultPosition, wx.DefaultSize, 0 ) self.st_nbseg.Wrap( -1 ) gs_params.Add( self.st_nbseg, 0, wx.ALIGN_CENTER_VERTICAL|wx.ALIGN_RIGHT|wx.ALL, 5 ) self.sp_nbseg = wx.SpinCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, wx.SP_ARROW_KEYS, 2, 100, 10 ) gs_params.Add( self.sp_nbseg, 0, wx.ALL|wx.SHAPED, 5 ) bvs_main.Add( gs_params, 1, wx.ALIGN_CENTER_VERTICAL|wx.ALL|wx.EXPAND|wx.SHAPED, 5 ) bhs_modal = wx.BoxSizer( wx.HORIZONTAL ) bhs_modal.AddSpacer( ( 0, 0), 1, wx.EXPAND, 5 ) self.but_cancel = wx.Button( self, wx.ID_ANY, u"Cancel", wx.DefaultPosition, wx.DefaultSize, 0 ) bhs_modal.Add( self.but_cancel, 0, wx.ALIGN_RIGHT|wx.EXPAND, 5 ) self.but_ok = wx.Button( self, wx.ID_ANY, u"Ok", wx.DefaultPosition, wx.DefaultSize, 0 ) bhs_modal.Add( self.but_ok, 0, 0, 5 ) bvs_main.Add( bhs_modal, 0, wx.EXPAND, 5 ) self.SetSizer( bvs_main ) self.Layout() bvs_main.Fit( self ) self.Centre( wx.BOTH )
def __init__(self, *args, **kwds): # Constructor kwds["style"] = wx.CAPTION|wx.CLOSE_BOX|wx.MINIMIZE_BOX wx.Frame.__init__(self, *args, **kwds) try: self.Parent.Hide() except: print "Error Closing Prent" self.label_1 = wx.StaticText(self, -1, "Year", style=wx.ALIGN_RIGHT|wx.ALIGN_CENTRE) self.combo_box_1 = wx.ComboBox(self, -1, choices=[ ], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY | wx.CB_SORT) self.label_2 = wx.StaticText(self, -1, "Standard", style=wx.ALIGN_RIGHT|wx.ALIGN_CENTRE) self.combo_box_2 = wx.ComboBox(self, -1, choices=[ 'Select',"8", "9", "10"], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY) self.label_3 = wx.StaticText(self, -1, "Div", style=wx.ALIGN_CENTRE) self.combo_box_3 = wx.ComboBox(self, -1, choices=[ 'Select',], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY | wx.CB_SORT) self.label_4 = wx.StaticText(self, -1, "Term", style=wx.ALIGN_CENTRE) self.combo_box_4 = wx.ComboBox(self, -1, choices=[ 'Select', "Term 1", "Term 2", "Annual"], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY) self.button_1 = wx.Button(self, -1, "Close") self.button_2 = wx.Button(self, -1, "Go") #self.SetMenu() self.__set_properties() self.__do_layout() self.IsGridChild=0 self.Bind(wx.EVT_COMBOBOX, self.on_year, self.combo_box_1) self.Bind(wx.EVT_COMBOBOX, self.on_class, self.combo_box_2) self.Bind(wx.EVT_COMBOBOX, self.on_division, self.combo_box_3) self.Bind(wx.EVT_BUTTON, self.Go_Clicked, self.button_2) self.Bind(wx.EVT_BUTTON, self.Cancel_Clicked, self.button_1) self.Bind(wx.EVT_CLOSE, self.OnClose) self.GridFrame = None self.YEAR='' #self.CalcSheet=SpreadSheet(self) self.DB=db_operations() self.load_year()
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
def __init__(self, *args, **kwds): # begin wxGlade: consolidated_report.__init__ kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX | wx.FRAME_FLOAT_ON_PARENT wx.Dialog.__init__(self, *args, **kwds) self.panel_1 = wx.Panel(self, -1) self.combo_box_1 = wx.ComboBox(self.panel_1, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY) self.combo_box_2 = wx.ComboBox(self.panel_1, -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_1, -1, choices=["Select Division"], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY) self.combo_box_4 = wx.ComboBox(self.panel_1, -1, choices=["Select Term","Term1","Term2","Annual"], style=wx.CB_DROPDOWN | wx.CB_SIMPLE | wx.CB_DROPDOWN | wx.CB_READONLY) self.label_1 = wx.StaticText(self.panel_1, -1, "Select What to Include") self.checkbox_1 = wx.CheckBox(self.panel_1, -1, "CE") self.checkbox_2 = wx.CheckBox(self.panel_1, -1, "TE") self.checkbox_3 = wx.CheckBox(self.panel_1, -1, "Total") self.checkbox_4 = wx.CheckBox(self.panel_1, -1, "Grade") self.checkbox_5 = wx.CheckBox(self.panel_1, -1, "CE Total") self.checkbox_6 = wx.CheckBox(self.panel_1, -1, "TE Total") self.checkbox_7 = wx.CheckBox(self.panel_1, -1, "Grand Total") allLoc = ['Select All'] list2=['I Language','Malayalam','English','Hindi','S.S','Physics','Biology','Chemistry','Maths','IT'] 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, list2) self.button_1 = wx.Button(self.panel_1, -1, "Close") self.button_2 = wx.Button(self.panel_1, -1, "Proceed") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_COMBOBOX, self.oncombo_year, self.combo_box_1) self.Bind(wx.EVT_COMBOBOX, self.oncombo_class, self.combo_box_2) self.Bind(wx.EVT_COMBOBOX, self.oncombo_div, self.combo_box_3) self.Bind(wx.EVT_COMBOBOX, self.oncombo_term, self.combo_box_4) 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_close, self.button_1) self.Bind(wx.EVT_BUTTON, self.on_proceed, self.button_2) self.Bind(wx.EVT_CHECKBOX, self.on_check_ce, self.checkbox_1) self.Bind(wx.EVT_CHECKBOX, self.on_check_te, self.checkbox_2) self.Bind(wx.EVT_CHECKBOX, self.on_check_tota, self.checkbox_3) self.Bind(wx.EVT_CHECKBOX, self.on_check_grade, self.checkbox_4) self.Bind(wx.EVT_CHECKBOX, self.on_check_ce_total, self.checkbox_5) self.Bind(wx.EVT_CHECKBOX, self.on_check_te_total, self.checkbox_6) self.Bind(wx.EVT_CHECKBOX, self.on_check_grand, self.checkbox_7) self.checkedItems=() self.checkedItems_2=[0,1,2,3] self.DB=db_operations() self.Selected_Index=[] self.YEAR='' self.CLASS='' self.DIV='' self.TERM='' self.load_year() # end wxGlade
def __init__(self, *args, **kwds): # Constructor kwds["style"] = wx.CAPTION|wx.CLOSE_BOX|wx.MINIMIZE_BOX wx.Dialog.__init__(self, *args, **kwds) self.label_1 = wx.StaticText(self, -1, "Year", style=wx.ALIGN_RIGHT|wx.ALIGN_CENTRE) self.combo_box_1 = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY) self.label_2 = wx.StaticText(self, -1, "Standard", style=wx.ALIGN_RIGHT|wx.ALIGN_CENTRE) self.combo_box_2 = wx.ComboBox(self, -1, choices=[ 'All',"8", "9"], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY) #self.label_3 = wx.StaticText(self, -1, "Division", style=wx.ALIGN_CENTRE) #self.combo_box_3 = wx.ComboBox(self, -1, choices=['All'], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY) #self.label_4 = wx.StaticText(self, -1, "Term", style=wx.ALIGN_CENTRE) #self.button_3 = wx.Button(self, -1, "Import File") #self.combo_box_4 = wx.ComboBox(self, -1, choices=[ "Term 1", "Term 2", "Annual"], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY) self.button_2 = wx.Button(self, -1, "Proceed") self.button_1 = wx.Button(self, -1, "Close") #self.SetMenu() self.__set_properties() self.__do_layout() self.Bind(wx.EVT_COMBOBOX, self.on_year, self.combo_box_1) self.Bind(wx.EVT_COMBOBOX, self.on_class, self.combo_box_2) #self.Bind(wx.EVT_COMBOBOX, self.on_division, self.combo_box_3) self.Bind(wx.EVT_BUTTON, self.ok_clicked, self.button_2) self.Bind(wx.EVT_BUTTON,self.on_close, self.button_1) #self.CalcSheet=SpreadSheet(self) self.YEAR='' self.DIVS=[] self.DB=db_operations() self.load_year()
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
def __init__(self, *args, **kwds): # Constructor kwds["style"] = wx.CAPTION|wx.CLOSE_BOX|wx.MINIMIZE_BOX wx.Dialog.__init__(self, *args, **kwds) self.label_1 = wx.StaticText(self, -1, "Year", style=wx.ALIGN_RIGHT|wx.ALIGN_CENTRE) self.combo_box_1 = wx.ComboBox(self, -1, choices=[], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY) self.label_2 = wx.StaticText(self, -1, "Standard", style=wx.ALIGN_RIGHT|wx.ALIGN_CENTRE) self.combo_box_2 = wx.ComboBox(self, -1, choices=[ 'Select',"8", "9", "10"], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY) self.label_3 = wx.StaticText(self, -1, "Division", style=wx.ALIGN_CENTRE) self.combo_box_3 = wx.ComboBox(self, -1, choices=['Select'], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY) #self.label_4 = wx.StaticText(self, -1, "Term", style=wx.ALIGN_CENTRE) #self.button_3 = wx.Button(self, -1, "Import File") #self.combo_box_4 = wx.ComboBox(self, -1, choices=[ "Term 1", "Term 2", "Annual"], style=wx.CB_DROPDOWN|wx.CB_DROPDOWN|wx.CB_READONLY) self.button_2 = wx.Button(self, -1, "Import") self.button_1 = wx.Button(self, -1, "Close") #self.SetMenu() self.__set_properties() self.__do_layout() self.Bind(wx.EVT_COMBOBOX, self.on_year, self.combo_box_1) self.Bind(wx.EVT_COMBOBOX, self.on_class, self.combo_box_2) self.Bind(wx.EVT_COMBOBOX, self.on_division, self.combo_box_3) self.Bind(wx.EVT_BUTTON, self.ok_clicked, self.button_2) self.Bind(wx.EVT_BUTTON, self.cancel_clicked, self.button_1) self.Bind(wx.EVT_CLOSE, self.on_close) #self.CalcSheet=SpreadSheet(self) self.YEAR='' self.DB=db_operations() self.load_year()
def __init__(self, *args, **kwds): # begin wxGlade: add_div.__init__ kwds["style"] = wx.CAPTION | wx.CLOSE_BOX | wx.MINIMIZE_BOX | wx.STAY_ON_TOP wx.Dialog.__init__(self, *args, **kwds) self.panel_1 = wx.ScrolledWindow(self, -1, style=wx.TAB_TRAVERSAL) self.label_1 = wx.StaticText(self.panel_1, -1, "YEAR") self.combo_box_1 = wx.ComboBox(self.panel_1, -1, choices=[], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY | wx.CB_SORT) self.label_2 = wx.StaticText(self.panel_1, -1, "CLASS") self.combo_box_2 = wx.ComboBox(self.panel_1, -1, choices=["Select","8","9","10"], style=wx.CB_DROPDOWN | wx.CB_DROPDOWN | wx.CB_READONLY | wx.CB_SORT) self.sizer_4_staticbox = wx.StaticBox(self.panel_1, -1, "Specify Class ") self.list_box_1 = wx.ListBox(self.panel_1, -1, choices=[], style=wx.LB_SINGLE | wx.LB_SORT) self.button_1 = wx.Button(self.panel_1, -1, "Remove Divison") self.text_ctrl_1 = wx.TextCtrl(self.panel_1, -1, "") self.button_2 = wx.Button(self.panel_1, -1, "Add Division") self.sizer_9_staticbox = wx.StaticBox(self.panel_1, -1, "New Division") self.button_3 = wx.Button(self.panel_1, -1, "Close") self.hyperlink_1 = wx.HyperlinkCtrl(self.panel_1, wx.ID_ANY, "", "Add Academic Year") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_COMBOBOX, self.on_year, self.combo_box_1) self.Bind(wx.EVT_COMBOBOX, self.on_class, self.combo_box_2) self.Bind(wx.EVT_LISTBOX, self.on_list, self.list_box_1) self.Bind(wx.EVT_BUTTON, self.on_remove, self.button_1) self.Bind(wx.EVT_TEXT, self.on_text, self.text_ctrl_1) self.Bind(wx.EVT_BUTTON, self.on_add, self.button_2) self.Bind(wx.EVT_BUTTON, self.on_close, self.button_3) self.text_ctrl_1 .Bind(wx.EVT_SET_FOCUS,self.onfocus) self.text_ctrl_1 .Bind(wx.EVT_KILL_FOCUS,self.offocus) self.text_ctrl_1.Bind(wx.EVT_KEY_DOWN, self.on_keypress) self.Bind(wx.EVT_HYPERLINK, self.on_hlink, self.hyperlink_1) self.YEAR='' self.CLASS='' self.DB=db_operations() self.load_year() # end wxGlade