我们从Python开源项目中,提取了以下15个代码示例,用于说明如何使用wx.MAXIMIZE_BOX。
def __init__(self, *args, **kwds): # begin wxGlade: Dialogo_acceso_vcenter.__init__ kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX wx.Dialog.__init__(self, *args, **kwds) self.label_7 = wx.StaticText(self, wx.ID_ANY, "Vcenter / esxi:") self.nombre_vcenter = wx.TextCtrl(self, wx.ID_ANY, "") self.label_9 = wx.StaticText(self, wx.ID_ANY, "Login:") self.login_vcenter = wx.TextCtrl(self, wx.ID_ANY, "") self.label_10 = wx.StaticText(self, wx.ID_ANY, "Password:") self.passwor_vcenter = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_PASSWORD) self.label_8 = wx.StaticText(self, wx.ID_ANY, "Puerto:") self.puert_vcenter = wx.TextCtrl(self, wx.ID_ANY, "") self.button_Exit = wx.Button(self, wx.ID_CANCEL, "Exit") self.button_Connect = wx.Button(self, wx.ID_OK, "Conectar") self.__set_properties() self.__do_layout() # end wxGlade
def __init__(self, *args, **kwds): # begin wxGlade: sms_dialoge.__init__ kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.THICK_FRAME wx.Frame.__init__(self, *args, **kwds) self.panel_5 = wx.Panel(self, wx.ID_ANY) self.label_7 = wx.StaticText(self.panel_5, wx.ID_ANY, ("Username")) self.combo_box_1 = wx.ComboBox(self.panel_5, wx.ID_ANY, choices=[("Select"), ("admin"), ("teacher")], style=wx.CB_READONLY|wx.CB_DROPDOWN) self.label_8 = wx.StaticText(self.panel_5, wx.ID_ANY, ("Password")) self.text_ctrl_1 = wx.TextCtrl(self.panel_5, wx.ID_ANY, "", style=wx.TE_PASSWORD) self.button_1 = wx.Button(self.panel_5, wx.ID_ANY, ("Cancel")) self.button_2 = wx.Button(self.panel_5, wx.ID_ANY, ("Login")) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_COMBOBOX, self.on_user, self.combo_box_1) self.Bind(wx.EVT_TEXT, self.on_text, self.text_ctrl_1) self.Bind(wx.EVT_BUTTON, self.on_cancel, self.button_1) self.Bind(wx.EVT_BUTTON, self.on_login, self.button_2) self.text_ctrl_1.Bind(wx.EVT_KEY_DOWN, self.OnKeyPress) self.Bind(wx.EVT_CLOSE,self.on_close,self) self.UO=user_operations(self) # end wxGlade
def __init__(self, parent, title): style = wx.DEFAULT_FRAME_STYLE & ~( wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX|wx.CLOSE_BOX) wx.Frame.__init__(self, parent, title=title, style=style, size=(400,60)) self.textbox = wx.TextCtrl(self) img = wx.Image("matags.png", wx.BITMAP_TYPE_ANY) bmp = wx.Bitmap(img) self.icon = wx.Icon() self.icon.CopyFromBitmap(bmp) self.SetIcon(self.icon) self.tbIcon = wx.adv.TaskBarIcon() self.tbIcon.SetIcon(self.icon) self.Show(True) self.Centre() self.reg_hot_keys() self.Bind(wx.EVT_HOTKEY, self.on_extract_tag, id=self.hotkeys['extract_tag'][0]) self.Bind(wx.EVT_HOTKEY, self.on_close, id=self.hotkeys['quit'][0]) self.Bind(wx.EVT_HOTKEY, self.on_activate, id=self.hotkeys['activate'][0]) self.Bind(wx.EVT_HOTKEY, self.on_refresh, id=self.hotkeys['refresh'][0]) self.textbox.Bind(wx.EVT_CHAR, self.check_key) # do not use EVT_KEY_DOWN, # it becomes difficult to get lower case # self.textbox.Bind(wx.EVT_KEY_DOWN, self.check_key) # self.Bind(wx.EVT_CLOSE, self.on_close) self.Bind(wx.EVT_ICONIZE, self.on_iconify) self.matags = MaTags() # try: # except Exception as e: # self.textbox.ChangeValue(e.args[0].decode('utf8', 'ignore')) # self.textbox.Disable()
def __init__(self, *args, **kwds): # begin wxGlade: Dialogo_texto.__init__ kwds["style"] = wx.DEFAULT_DIALOG_STYLE | wx.MAXIMIZE_BOX | wx.RESIZE_BORDER wx.Dialog.__init__(self, *args, **kwds) self.salida_texto = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_PROCESS_ENTER | wx.TE_PROCESS_TAB) self.bnt_salida_ok = wx.Button(self, wx.ID_OK, "OK", style=wx.BU_BOTTOM) self.sizer_1_staticbox = wx.StaticBox(self, wx.ID_ANY, "Information") self.__set_properties() self.__do_layout() # end wxGlade
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
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): """Constructor""" no_caption = (wx.MINIMIZE_BOX | wx.MAXIMIZE_BOX | wx.RESIZE_BORDER | wx.SYSTEM_MENU | wx.CLOSE_BOX | wx.CLIP_CHILDREN) wx.Frame.__init__(self, None, title="No Caption", style=no_caption) panel = wx.Panel(self) self.Show()
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): """Constructor""" no_resize = wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.MAXIMIZE_BOX) wx.Frame.__init__(self, None, title="No Resize", style=no_resize) panel = wx.Panel(self) self.Show()
def __init__(self, images, parent=None, id=wx.ID_ANY, title='CellStar explorer', x=900, y=600): """ @type images: ImageRepo """ style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX wx.Dialog.__init__(self, parent, id, title, style=style) self.Size = (x, y) self.figure = mpl.figure.Figure(dpi=300, figsize=(1, 1)) self.axes = self.figure.add_subplot(111) self.axes.margins(0, 0) self.canvas = Canvas(self, -1, self.figure) self.toolbar = Toolbar(self.canvas) self.toolbar.Realize() self.abort = False sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(self.canvas, 1, wx.EXPAND) sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND) self.SetSizer(sizer) self.layer0 = self.axes.imshow(images.image, cmap=mpl.cm.gray) def onclick_internal(event): if event.ydata is None: return print 'button=%d, x=%d, y=%d, xdata=%f, ydata=%f' % ( event.button, event.x, event.y, event.xdata, event.ydata) if event.button != 1: self.onclick(event.button, event.xdata, event.ydata) self.figure.canvas.draw() def press_internal(event): print('press', event.key) if event.key == 'b': # abort self.EndModal(ExplorerFrame.ABORTED) if event.key in 'qwerxcv': self.layer0.remove() if event.key == 'q': # input self.layer0 = self.axes.imshow(images.image, cmap=mpl.cm.gray) elif event.key == 'w': # image clean self.layer0 = self.axes.imshow(images.image_back_difference, cmap=mpl.cm.gray) elif event.key == 'x': # image clean self.layer0 = self.axes.imshow(images.image_back_difference_blurred, cmap=mpl.cm.gray) elif event.key == 'c': # image clean self.layer0 = self.axes.imshow(images.foreground_mask, cmap=mpl.cm.gray) elif event.key == 'v': # image clean self.layer0 = self.axes.imshow(images.background_mask, cmap=mpl.cm.gray) elif event.key == 'e': # brighter self.layer0 = self.axes.imshow(images.brighter, cmap=mpl.cm.gray) elif event.key == 'r': # darker self.layer0 = self.axes.imshow(images.darker, cmap=mpl.cm.gray) self.figure.canvas.draw() else: self.press(event.key) self.figure.canvas.draw() self.figure.canvas.mpl_connect('button_press_event', onclick_internal) self.figure.canvas.mpl_connect('key_press_event', press_internal) self.Show(True)
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: 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")
def __init__(self, controller_uid): UIViewBase.__init__(self, controller_uid) wx.Frame.__init__(self, None, -1, title='LogPlotEditor', size=(950, 600), style=wx.DEFAULT_FRAME_STYLE & (~wx.RESIZE_BORDER) &(~wx.MAXIMIZE_BOX) ) main_sizer = wx.BoxSizer(wx.VERTICAL) self.base_panel = wx.Panel(self) self.note = wx.Notebook(self.base_panel) bsizer = wx.BoxSizer(wx.HORIZONTAL) bsizer.Add(self.note, 1, wx.ALL|wx.EXPAND, border=5) self.base_panel.SetSizer(bsizer) #UIM = UIManager() #UIM.create('lpe_track_panel_controller', self.uid) #parent_controller_uid = UIM._getparentuid(self._controller_uid) ''' tracks_base_panel = wx.Panel(note, style=wx.SIMPLE_BORDER) sizer_grid_panel = wx.BoxSizer(wx.VERTICAL) self.tracks_model = TracksModel(parent_controller_uid) tp = TracksPanel(tracks_base_panel, self.tracks_model) sizer_grid_panel.Add(tp, 1, wx.EXPAND|wx.ALL, border=10) tracks_base_panel.SetSizer(sizer_grid_panel) note.AddPage(tracks_base_panel, "Tracks", True) ''' ''' curves_base_panel = wx.Panel(note, style=wx.SIMPLE_BORDER) sizer_curves_panel = wx.BoxSizer(wx.VERTICAL) self.curves_model = CurvesModel(parent_controller_uid) cp = TrackObjectsPanel(curves_base_panel, self.curves_model) sizer_curves_panel.Add(cp, 1, wx.EXPAND|wx.ALL, border=10) curves_base_panel.SetSizer(sizer_curves_panel) note.AddPage(curves_base_panel, "Objects", True) ''' main_sizer.Add(self.base_panel, 1, wx.EXPAND) bottom_panel = wx.Panel(self) sizer = wx.BoxSizer(wx.VERTICAL) btn_close = wx.Button(bottom_panel, -1, "Close") sizer.Add(btn_close, 0, wx.ALIGN_RIGHT|wx.RIGHT|wx.BOTTOM, border=10) btn_close.Bind(wx.EVT_BUTTON, self.on_close) bottom_panel.SetSizer(sizer) main_sizer.Add(bottom_panel, 0, wx.EXPAND) self.SetSizer(main_sizer) class_full_name = str(self.__class__.__module__) + '.' + str(self.__class__.__name__) log.debug('Successfully created View object from class: {}.'.format(class_full_name)) self.Bind(wx.EVT_CLOSE, self.on_close)
def __init__(self, logplot, track_id=ID_ALL_TRACKS, logplotformat=None, ok_callback=None): self.logplot = logplot self.track_id = track_id self.welluid = self.logplot.get_well_uid() self._OM = ObjectManager(self) #well = self._OM.get(self.welluid) if logplotformat is None: logplotformat = LogPlotFormat() self.original_logplotformat = logplotformat self.edited_logplotformat = copy.deepcopy(self.original_logplotformat) wx.Frame.__init__(self, self.logplot, -1, title="Log Plot Format - TESTE", size=(850, 600), style=wx.DEFAULT_FRAME_STYLE & (~wx.RESIZE_BORDER) &(~wx.MAXIMIZE_BOX)) self.callback = ok_callback sizer = wx.BoxSizer(wx.VERTICAL) self.base = wx.Panel(self) note = wx.Notebook(self.base) bsizer = wx.BoxSizer(wx.HORIZONTAL) bsizer.Add(note, 1, wx.ALL|wx.EXPAND, border=5) self.base.SetSizer(bsizer) self.tracks_model = None self.curves_model = CurvesModel(self.edited_logplotformat, self.track_id) if self.track_id == self.ID_ALL_TRACKS: self.tracks_model = TracksModel(self.edited_logplotformat) tn = TracksNotifier(self.edited_logplotformat, self.curves_model) self.tracks_model.AddNotifier(tn) tn.SetOwner(self.tracks_model) self.grid_panel = BasePanel(note, 'grid', self.welluid, self.track_id, self.tracks_model) note.AddPage(self.grid_panel, "Grid", True) else: self.grid_panel = None if self.tracks_model is not None: cn = CurvesNotifier(self.edited_logplotformat, self.tracks_model) self.curves_model.AddNotifier(cn) cn.SetOwner(self.curves_model) self.curves_panel = BasePanel(note, 'curves', self.welluid, self.track_id, self.curves_model) note.AddPage(self.curves_panel, "Curves", False) note.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self._OnNotePageChanging) sizer.Add(self.base, 1, wx.EXPAND) sizer.Add(self.getPanelBottomButtons(), 0, wx.EXPAND|wx.BOTTOM|wx.TOP) self.SetSizer(sizer)