Python wx.GROW Examples
The following are 30
code examples of wx.GROW().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
wx
, or try the search function
.
Example #1
Source File: matplotlib_eg.py From tensorlang with Apache License 2.0 | 6 votes |
def __init__(self): wx.Frame.__init__(self, None, -1, 'CanvasFrame', size=(550, 350)) if sys.version_info[0] == 3: color = wx.Colour("WHITE") else: color = wx.NamedColour("WHITE") self.SetBackgroundColour(color) self.figure = Figure() self.axes = self.figure.add_subplot(111) t = arange(0.0, 3.0, 0.01) s = sin(2 * pi * t) self.axes.plot(t, s) self.canvas = FigureCanvas(self, -1, self.figure) self.sizer = wx.BoxSizer(wx.VERTICAL) self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW) self.SetSizerAndFit(self.sizer) self.add_toolbar()
Example #2
Source File: backend_wx.py From coffeegrindsize with MIT License | 6 votes |
def __init__(self, targetfig): global FigureManager # placates pyflakes: created by @_Backend.export wx.Frame.__init__(self, None, -1, "Configure subplots") toolfig = Figure((6, 3)) canvas = FigureCanvasWx(self, -1, toolfig) # Create a figure manager to manage things figmgr = FigureManager(canvas, 1, self) # Now put all into a sizer sizer = wx.BoxSizer(wx.VERTICAL) # This way of adding to sizer allows resizing sizer.Add(canvas, 1, wx.LEFT | wx.TOP | wx.GROW) self.SetSizer(sizer) self.Fit() tool = SubplotTool(targetfig, toolfig)
Example #3
Source File: backend_wx.py From GraphicDesignPatternByPython with MIT License | 6 votes |
def __init__(self, targetfig): global FigureManager # placates pyflakes: created by @_Backend.export wx.Frame.__init__(self, None, -1, "Configure subplots") toolfig = Figure((6, 3)) canvas = FigureCanvasWx(self, -1, toolfig) # Create a figure manager to manage things figmgr = FigureManager(canvas, 1, self) # Now put all into a sizer sizer = wx.BoxSizer(wx.VERTICAL) # This way of adding to sizer allows resizing sizer.Add(canvas, 1, wx.LEFT | wx.TOP | wx.GROW) self.SetSizer(sizer) self.Fit() tool = SubplotTool(targetfig, toolfig)
Example #4
Source File: backend_wx.py From coffeegrindsize with MIT License | 6 votes |
def configure_subplots(self, evt): global FigureManager # placates pyflakes: created by @_Backend.export frame = wx.Frame(None, -1, "Configure subplots") _set_frame_icon(frame) toolfig = Figure((6, 3)) canvas = self.get_canvas(frame, toolfig) # Create a figure manager to manage things figmgr = FigureManager(canvas, 1, frame) # Now put all into a sizer sizer = wx.BoxSizer(wx.VERTICAL) # This way of adding to sizer allows resizing sizer.Add(canvas, 1, wx.LEFT | wx.TOP | wx.GROW) frame.SetSizer(sizer) frame.Fit() tool = SubplotTool(self.canvas.figure, toolfig) frame.Show()
Example #5
Source File: backend_wx.py From GraphicDesignPatternByPython with MIT License | 6 votes |
def configure_subplots(self, evt): global FigureManager # placates pyflakes: created by @_Backend.export frame = wx.Frame(None, -1, "Configure subplots") _set_frame_icon(frame) toolfig = Figure((6, 3)) canvas = self.get_canvas(frame, toolfig) # Create a figure manager to manage things figmgr = FigureManager(canvas, 1, frame) # Now put all into a sizer sizer = wx.BoxSizer(wx.VERTICAL) # This way of adding to sizer allows resizing sizer.Add(canvas, 1, wx.LEFT | wx.TOP | wx.GROW) frame.SetSizer(sizer) frame.Fit() tool = SubplotTool(self.canvas.figure, toolfig) frame.Show()
Example #6
Source File: backend_wx.py From neural-network-animation with MIT License | 6 votes |
def configure_subplots(self, evt): frame = wx.Frame(None, -1, "Configure subplots") toolfig = Figure((6,3)) canvas = self.get_canvas(frame, toolfig) # Create a figure manager to manage things figmgr = FigureManager(canvas, 1, frame) # Now put all into a sizer sizer = wx.BoxSizer(wx.VERTICAL) # This way of adding to sizer allows resizing sizer.Add(canvas, 1, wx.LEFT|wx.TOP|wx.GROW) frame.SetSizer(sizer) frame.Fit() tool = SubplotTool(self.canvas.figure, toolfig) frame.Show()
Example #7
Source File: backend_wx.py From neural-network-animation with MIT License | 6 votes |
def __init__(self, targetfig): wx.Frame.__init__(self, None, -1, "Configure subplots") toolfig = Figure((6,3)) canvas = FigureCanvasWx(self, -1, toolfig) # Create a figure manager to manage things figmgr = FigureManager(canvas, 1, self) # Now put all into a sizer sizer = wx.BoxSizer(wx.VERTICAL) # This way of adding to sizer allows resizing sizer.Add(canvas, 1, wx.LEFT|wx.TOP|wx.GROW) self.SetSizer(sizer) self.Fit() tool = SubplotTool(targetfig, toolfig)
Example #8
Source File: backend_wx.py From matplotlib-4-abaqus with MIT License | 6 votes |
def configure_subplots(self, evt): frame = wx.Frame(None, -1, "Configure subplots") toolfig = Figure((6,3)) canvas = self.get_canvas(frame, toolfig) # Create a figure manager to manage things figmgr = FigureManager(canvas, 1, frame) # Now put all into a sizer sizer = wx.BoxSizer(wx.VERTICAL) # This way of adding to sizer allows resizing sizer.Add(canvas, 1, wx.LEFT|wx.TOP|wx.GROW) frame.SetSizer(sizer) frame.Fit() tool = SubplotTool(self.canvas.figure, toolfig) frame.Show()
Example #9
Source File: backend_wx.py From matplotlib-4-abaqus with MIT License | 6 votes |
def __init__(self, targetfig): wx.Frame.__init__(self, None, -1, "Configure subplots") toolfig = Figure((6,3)) canvas = FigureCanvasWx(self, -1, toolfig) # Create a figure manager to manage things figmgr = FigureManager(canvas, 1, self) # Now put all into a sizer sizer = wx.BoxSizer(wx.VERTICAL) # This way of adding to sizer allows resizing sizer.Add(canvas, 1, wx.LEFT|wx.TOP|wx.GROW) self.SetSizer(sizer) self.Fit() tool = SubplotTool(targetfig, toolfig)
Example #10
Source File: backend_wx.py From Computable with MIT License | 6 votes |
def __init__(self, targetfig): wx.Frame.__init__(self, None, -1, "Configure subplots") toolfig = Figure((6,3)) canvas = FigureCanvasWx(self, -1, toolfig) # Create a figure manager to manage things figmgr = FigureManager(canvas, 1, self) # Now put all into a sizer sizer = wx.BoxSizer(wx.VERTICAL) # This way of adding to sizer allows resizing sizer.Add(canvas, 1, wx.LEFT|wx.TOP|wx.GROW) self.SetSizer(sizer) self.Fit() tool = SubplotTool(targetfig, toolfig)
Example #11
Source File: backend_wx.py From Mastering-Elasticsearch-7.0 with MIT License | 6 votes |
def configure_subplots(self, evt): global FigureManager # placates pyflakes: created by @_Backend.export frame = wx.Frame(None, -1, "Configure subplots") _set_frame_icon(frame) toolfig = Figure((6, 3)) canvas = self.get_canvas(frame, toolfig) # Create a figure manager to manage things FigureManager(canvas, 1, frame) # Now put all into a sizer sizer = wx.BoxSizer(wx.VERTICAL) # This way of adding to sizer allows resizing sizer.Add(canvas, 1, wx.LEFT | wx.TOP | wx.GROW) frame.SetSizer(sizer) frame.Fit() SubplotTool(self.canvas.figure, toolfig) frame.Show()
Example #12
Source File: Input_Dialog_OLD1.py From topoflow with MIT License | 6 votes |
def row_box(self, row): label = wx.TextCtrl(self.panel, -1, value=self.var_names[row]) model_input_types = ["Scalar", "Time series", "Grid", "Grid sequence"] dlist = wx.Choice(self.panel, -1, choices=model_input_types) # Set to current input type here text = wx.TextCtrl(self.panel, -1, self.var_setting[row]) ustr = wx.StaticText(self.panel, -1, self.var_units[row]) # self.Bind(wx.EVT_CHOICE, self.onChoice, self.var_type) box = wx.BoxSizer(wx.HORIZONTAL) box.Add(label, 0, wx.GROW, border=self.pad) box.Add(dlist, 0, wx.GROW, border=self.pad) box.Add(text, 0, wx.GROW, border=self.pad) box.Add(ustr, 0, wx.GROW, border=self.pad) # box.AddMany([label, dlist, text, ustr]) #, 1, wx.EXPAND) # self.SetSizer(box) return box #--------------------------------------------- # Create sizer box for the process timestep #---------------------------------------------
Example #13
Source File: backend_wx.py From python3_ios with BSD 3-Clause "New" or "Revised" License | 6 votes |
def __init__(self, targetfig): global FigureManager # placates pyflakes: created by @_Backend.export wx.Frame.__init__(self, None, -1, "Configure subplots") toolfig = Figure((6, 3)) canvas = FigureCanvasWx(self, -1, toolfig) # Create a figure manager to manage things figmgr = FigureManager(canvas, 1, self) # Now put all into a sizer sizer = wx.BoxSizer(wx.VERTICAL) # This way of adding to sizer allows resizing sizer.Add(canvas, 1, wx.LEFT | wx.TOP | wx.GROW) self.SetSizer(sizer) self.Fit() tool = SubplotTool(targetfig, toolfig)
Example #14
Source File: backend_wx.py From Computable with MIT License | 6 votes |
def configure_subplots(self, evt): frame = wx.Frame(None, -1, "Configure subplots") toolfig = Figure((6,3)) canvas = self.get_canvas(frame, toolfig) # Create a figure manager to manage things figmgr = FigureManager(canvas, 1, frame) # Now put all into a sizer sizer = wx.BoxSizer(wx.VERTICAL) # This way of adding to sizer allows resizing sizer.Add(canvas, 1, wx.LEFT|wx.TOP|wx.GROW) frame.SetSizer(sizer) frame.Fit() tool = SubplotTool(self.canvas.figure, toolfig) frame.Show()
Example #15
Source File: DownloadManager.py From BitTorrent with GNU General Public License v3.0 | 6 votes |
def __init__(self, parent, torrent, *a, **k): BTPanel.__init__(self, parent, *a, **k) self.log = wx.TextCtrl(self, style=wx.TE_MULTILINE|wx.TE_READONLY|wx.TE_RICH2) self.log.Bind(wx.EVT_TEXT, self.OnText) self.Add(self.log, flag=wx.GROW, proportion=1) class MyTorrentLogger(logging.Handler): def set_log_func(self, func): self.log_func = func def emit(self, record): gui_wrap(self.log_func, self.format(record) + '\n') l = MyTorrentLogger() l.setFormatter(bt_log_fmt) l.set_log_func(self.log.AppendText) torrent.handler.setTarget(l) torrent.handler.flush()
Example #16
Source File: DownloadManager.py From BitTorrent with GNU General Public License v3.0 | 6 votes |
def toggle_details(self, event=None): if self.details_shown: self.sizer.AddGrowableRow(0) self.notebook.Hide() self.sizer.Detach(self.notebook) if sys.platform == 'darwin': self.parent.sizer.SetItemMinSize(self, (-1, -1)) self.sizer.Layout() self.details_button.SetLabel(_("Show &Details")) self.parent.Fit() self.details_shown = False else: self.sizer.RemoveGrowableRow(0) self.notebook.Show() self.sizer.Add(self.notebook, flag=wx.GROW, proportion=1) if sys.platform == 'darwin': self.parent.sizer.SetItemMinSize(self, (100, 420)) self.sizer.Layout() self.details_button.SetLabel(_("Hide &Details")) self.parent.Fit() self.details_shown = True
Example #17
Source File: activities_profile.py From grass-tangible-landscape with GNU General Public License v2.0 | 6 votes |
def __init__(self, parent): wx.Frame.__init__(self, parent) self.figure = Figure() self.axes = self.figure.add_subplot(111) self.canvas = FigureCanvas(self, -1, self.figure) self.sizer = wx.BoxSizer(wx.VERTICAL) self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW) self.SetSizer(self.sizer) self.Fit() self.distances = [] self.elevations = [] self.point_distances = [] self.point_elevations = [] self.limx = [0, 1] self.limy = [0, 1] self.ticks = 1
Example #18
Source File: backend_wx.py From ImageFusion with MIT License | 6 votes |
def configure_subplots(self, evt): frame = wx.Frame(None, -1, "Configure subplots") toolfig = Figure((6,3)) canvas = self.get_canvas(frame, toolfig) # Create a figure manager to manage things figmgr = FigureManager(canvas, 1, frame) # Now put all into a sizer sizer = wx.BoxSizer(wx.VERTICAL) # This way of adding to sizer allows resizing sizer.Add(canvas, 1, wx.LEFT|wx.TOP|wx.GROW) frame.SetSizer(sizer) frame.Fit() tool = SubplotTool(self.canvas.figure, toolfig) frame.Show()
Example #19
Source File: backend_wx.py From ImageFusion with MIT License | 6 votes |
def __init__(self, targetfig): wx.Frame.__init__(self, None, -1, "Configure subplots") toolfig = Figure((6,3)) canvas = FigureCanvasWx(self, -1, toolfig) # Create a figure manager to manage things figmgr = FigureManager(canvas, 1, self) # Now put all into a sizer sizer = wx.BoxSizer(wx.VERTICAL) # This way of adding to sizer allows resizing sizer.Add(canvas, 1, wx.LEFT|wx.TOP|wx.GROW) self.SetSizer(sizer) self.Fit() tool = SubplotTool(targetfig, toolfig)
Example #20
Source File: Bling.py From BitTorrent with GNU General Public License v3.0 | 6 votes |
def __init__(self, parent, history, *a, **k): BTPanel.__init__(self, parent, *a, **k) #self.SetMinSize((200, 200)) self.notebook = wx.Notebook(self, style=wx.CLIP_CHILDREN) self.statistics = StatisticsPanel(self.notebook, style=wx.CLIP_CHILDREN) self.notebook.AddPage(self.statistics, _("Statistics")) self.bling = BandwidthGraphPanel(self.notebook, history) self.speed_tab_index = self.notebook.GetPageCount() self.notebook.AddPage(self.bling, _("Speed")) self.notebook.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.OnPageChanged) self.sizer.Add(self.notebook, flag=wx.GROW, proportion=1) self.Hide() self.sizer.Layout()
Example #21
Source File: panel.py From admin4 with Apache License 2.0 | 6 votes |
def __init__(self, parent, label, xxx): ParamPage.__init__(self, parent, xxx) box = wx.StaticBox(self, -1, label) box.SetFont(g.labelFont()) topSizer = wx.StaticBoxSizer(box, wx.VERTICAL) sizer = wx.FlexGridSizer(len(xxx.styles), 2, 0, 1) sizer.AddGrowableCol(1) for param in xxx.styles: present = xxx.params.has_key(param) check = wx.CheckBox(self, paramIDs[param], param + ':', size = (LABEL_WIDTH,-1), name = param) check.SetValue(present) control = paramDict[param](self, name = param) control.Enable(present) sizer.AddMany([ (check, 0, wx.ALIGN_CENTER_VERTICAL), (control, 0, wx.ALIGN_CENTER_VERTICAL | wx.GROW) ]) self.checks[param] = check self.controls[param] = control topSizer.Add(sizer, 1, wx.ALL | wx.EXPAND, 3) self.SetAutoLayout(True) self.SetSizer(topSizer) topSizer.Fit(self) # Set data for a cahced page
Example #22
Source File: Input_Dialog_OLD2.py From topoflow with MIT License | 6 votes |
def row_box(self, row): label = wx.TextCtrl(self.panel, -1, value=self.var_names[row]) model_input_types = ["Scalar", "Time series", "Grid", "Grid sequence"] dlist = wx.Choice(self.panel, -1, choices=model_input_types) # Set to current input type here text = wx.TextCtrl(self.panel, -1, self.var_setting[row]) ustr = wx.StaticText(self.panel, -1, self.var_units[row]) # self.Bind(wx.EVT_CHOICE, self.onChoice, self.var_type) box = wx.BoxSizer(wx.HORIZONTAL) box.Add(label, 0, wx.GROW, border=self.pad) box.Add(dlist, 0, wx.GROW, border=self.pad) box.Add(text, 0, wx.GROW, border=self.pad) box.Add(ustr, 0, wx.GROW, border=self.pad) # box.AddMany([label, dlist, text, ustr]) #, 1, wx.EXPAND) # self.SetSizer(box) return box #--------------------------------------------- # Create sizer box for the process timestep #---------------------------------------------
Example #23
Source File: embedding_in_wx3_sgskip.py From python3_ios with BSD 3-Clause "New" or "Revised" License | 6 votes |
def __init__(self, parent): wx.Panel.__init__(self, parent, -1) self.fig = Figure((5, 4), 75) self.canvas = FigureCanvas(self, -1, self.fig) self.toolbar = NavigationToolbar(self.canvas) # matplotlib toolbar self.toolbar.Realize() # self.toolbar.set_active([0,1]) # Now put all into a sizer sizer = wx.BoxSizer(wx.VERTICAL) # This way of adding to sizer allows resizing sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW) # Best to allow the toolbar to resize! sizer.Add(self.toolbar, 0, wx.GROW) self.SetSizer(sizer) self.Fit()
Example #24
Source File: outlier_frame_extraction_toolbox.py From DeepLabCut with GNU Lesser General Public License v3.0 | 5 votes |
def __init__(self, parent, gui_size, **kwargs): h = gui_size[0] / 2 w = gui_size[1] / 3 wx.Panel.__init__(self, parent, -1, style=wx.SUNKEN_BORDER, size=(h, w)) self.figure = matplotlib.figure.Figure() self.axes = self.figure.add_subplot(1, 1, 1) self.canvas = FigureCanvas(self, -1, self.figure) self.sizer = wx.BoxSizer(wx.VERTICAL) self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW) self.SetSizer(self.sizer) self.Fit()
Example #25
Source File: frame_extraction_toolbox.py From DeepLabCut with GNU Lesser General Public License v3.0 | 5 votes |
def __init__(self, parent, config, gui_size, **kwargs): h = gui_size[0] / 2 w = gui_size[1] / 3 wx.Panel.__init__(self, parent, -1, style=wx.SUNKEN_BORDER, size=(h, w)) self.figure = matplotlib.figure.Figure() self.axes = self.figure.add_subplot(1, 1, 1) self.canvas = FigureCanvas(self, -1, self.figure) self.sizer = wx.BoxSizer(wx.VERTICAL) self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW) self.SetSizer(self.sizer) self.Fit()
Example #26
Source File: multiple_individuals_labeling_toolbox.py From DeepLabCut with GNU Lesser General Public License v3.0 | 5 votes |
def __init__(self, parent, config, gui_size, **kwargs): h = gui_size[0] / 2 w = gui_size[1] / 3 wx.Panel.__init__(self, parent, -1, style=wx.SUNKEN_BORDER, size=(h, w)) self.figure = matplotlib.figure.Figure() self.axes = self.figure.add_subplot(1, 1, 1) self.canvas = FigureCanvas(self, -1, self.figure) self.orig_xlim = None self.orig_ylim = None self.sizer = wx.BoxSizer(wx.VERTICAL) self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW) self.SetSizer(self.sizer) self.Fit()
Example #27
Source File: multiple_individuals_refinement_toolbox.py From DeepLabCut with GNU Lesser General Public License v3.0 | 5 votes |
def __init__(self, parent, config, gui_size, **kwargs): h = gui_size[0] / 2 w = gui_size[1] / 3 wx.Panel.__init__(self, parent, -1, style=wx.SUNKEN_BORDER, size=(h, w)) self.figure = matplotlib.figure.Figure() self.axes = self.figure.add_subplot(1, 1, 1) self.canvas = FigureCanvas(self, -1, self.figure) self.orig_xlim = None self.orig_ylim = None self.sizer = wx.BoxSizer(wx.VERTICAL) self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW) self.SetSizer(self.sizer) self.Fit()
Example #28
Source File: refinement.py From DeepLabCut with GNU Lesser General Public License v3.0 | 5 votes |
def __init__(self, parent, config, gui_size, **kwargs): h = gui_size[0] / 2 w = gui_size[1] / 3 wx.Panel.__init__(self, parent, -1, style=wx.SUNKEN_BORDER, size=(h, w)) self.figure = matplotlib.figure.Figure() self.axes = self.figure.add_subplot(1, 1, 1) self.canvas = FigureCanvas(self, -1, self.figure) self.orig_xlim = None self.orig_ylim = None self.sizer = wx.BoxSizer(wx.VERTICAL) self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW) self.SetSizer(self.sizer) self.Fit()
Example #29
Source File: commondialogs.py From CANFestivino with GNU Lesser General Public License v2.1 | 5 votes |
def _init_coll_MainSizer_Items(self, parent): parent.AddWindow(self.staticText1, 0, border=20, flag=wx.GROW|wx.TOP|wx.LEFT|wx.RIGHT) parent.AddWindow(self.ValuesGrid, 0, border=20, flag=wx.GROW|wx.TOP|wx.LEFT|wx.RIGHT) parent.AddSizer(self.ButtonPanelSizer, 0, border=20, flag=wx.ALIGN_RIGHT|wx.LEFT|wx.RIGHT) parent.AddSizer(self.ButtonSizer, 0, border=20, flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
Example #30
Source File: commondialogs.py From CANFestivino with GNU Lesser General Public License v2.1 | 5 votes |
def _init_coll_BottomSizer_Items(self, parent): parent.AddWindow(self.EDSFile, 0, border=4, flag=wx.GROW|wx.TOP|wx.BOTTOM) parent.AddWindow(self.ImportEDS, 0, border=0, flag=0)