Python wx.SplitterWindow() Examples

The following are 8 code examples of wx.SplitterWindow(). 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: CodeFileEditor.py    From OpenPLC_Editor with GNU General Public License v3.0 6 votes vote down vote up
def _create_CodePanel(self, prnt):
        self.CodeEditorPanel = wx.SplitterWindow(prnt)
        self.CodeEditorPanel.SetMinimumPaneSize(1)

        self.VariablesPanel = VariablesEditor(self.CodeEditorPanel,
                                              self.ParentWindow,
                                              self.Controler,
                                              self.COLUMNS_TYPE)

        if self.CODE_EDITOR is not None:
            self.CodeEditor = self.CODE_EDITOR(self.CodeEditorPanel,
                                               self.ParentWindow, self.Controler)

            self.CodeEditorPanel.SplitHorizontally(self.VariablesPanel,
                                                   self.CodeEditor, 150)
        else:
            self.CodeEditorPanel.Initialize(self.VariablesPanel)

        return self.CodeEditorPanel 
Example #2
Source File: live_demo.py    From mr_saliency with GNU General Public License v2.0 5 votes vote down vote up
def __init__(self, parent, title):
        wx.Frame.__init__(self, parent, title = title, size = (640,300))

        # Set variable panels
        self.main_splitter = wx.SplitterWindow(self)
        self.up_splitter = wx.SplitterWindow(self.main_splitter)
        self.buttompanel = ButtonPanel(self.main_splitter)
        self.saliencypanel = ShowSaliency(self.up_splitter,capture2)
        self.oripanel = ShowCapture(self.up_splitter,capture)
        self.up_splitter.SplitVertically(self.saliencypanel,self.oripanel,sashPosition=320)
        self.main_splitter.SplitHorizontally(self.up_splitter,self.buttompanel,sashPosition=240) 
Example #3
Source File: splitter_window.py    From wxGlade with MIT License 5 votes vote down vote up
def create_widget(self):
        size = self._get_default_or_client_size()
        self.widget = wx.SplitterWindow(self.parent_window.widget, self.id, size=size, style=self.style) 
Example #4
Source File: EditorPanel.py    From OpenPLC_Editor with GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, parent, tagname, window, controler, debug=False):
        wx.SplitterWindow.__init__(self, parent,
                                   style=wx.SUNKEN_BORDER | wx.SP_3D)

        self.ParentWindow = window
        self.Controler = controler
        self.TagName = tagname
        self.Icon = None
        self.Debug = debug

        self._init_ctrls(parent) 
Example #5
Source File: main.py    From wxGlade with MIT License 4 votes vote down vote up
def __init__(self):
        version = config.version
        pos, size, layout = self.init_layout_settings()
        wx.Frame.__init__(self, None, -1, "wxGlade v%s" % version, pos=pos, size=size,
                          style=wx.DEFAULT_FRAME_STYLE, name='MainFrame')

        common.main = self
        self._set_icon()
        self.create_menu()
        self.create_toolbar()

        style = wx.SP_3D | wx.SP_LIVE_UPDATE
        self.splitter1 = wx.SplitterWindow(self, style=style)
        self.splitter2 = wx.SplitterWindow(self.splitter1, style=style)
        self.palette = wxGladePalettePanel(self.splitter2)

        # create the property and the tree frame
        common.property_panel = self.property_panel = wxGladePropertyPanel(self.splitter2)
        common.root = app = application.Application()
        common.app_tree = self.tree = WidgetTree(self.splitter1, app)

        self.splitter1.SplitVertically(self.splitter2, self.tree)
        self.splitter2.SplitHorizontally(self.palette, self.property_panel)

        self.switch_layout(layout, initial=True)

        # last visited directory, used on GTK for wxFileDialog
        self.cur_dir = config.preferences.open_save_path

        # set a drop target for us...
        self._droptarget = FileDropTarget(self)
        self.SetDropTarget(self._droptarget)

        self.create_statusbar()  # create statusbar for display of messages

        self.Show()
        #misc.set_focused_widget(common.root)
        self.Bind(wx.EVT_CLOSE, self.on_close)

        # disable autosave checks during unittests
        if config.testing: return
        self.init_autosave()
        self.check_autosaved()

        self.Bind(wx.EVT_CHAR_HOOK, self.on_char_hook)
        if config.debugging:
            self.splitter1.Bind(wx.EVT_SPLITTER_SASH_POS_CHANGED, self.on_sash)
            self.splitter2.Bind(wx.EVT_SPLITTER_SASH_POS_CHANGED, self.on_sash) 
Example #6
Source File: BasesEtc_Phoenix.py    From wxGlade with MIT License 4 votes vote down vote up
def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame.__init__
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.SetSize((400, 300))
        self.SetTitle("frame")

        # Menu Bar
        self.frame_menubar = wx.MenuBar()
        self.SetMenuBar(self.frame_menubar)
        # Menu Bar end

        self.frame_statusbar = self.CreateStatusBar(1)
        self.frame_statusbar.SetStatusWidths([-1])
        # statusbar fields
        frame_statusbar_fields = ["frame_statusbar"]
        for i in range(len(frame_statusbar_fields)):
            self.frame_statusbar.SetStatusText(frame_statusbar_fields[i], i)

        # Tool Bar
        self.frame_toolbar = wx.ToolBar(self, -1)
        self.SetToolBar(self.frame_toolbar)
        self.frame_toolbar.Realize()
        # Tool Bar end

        self.panel_x = wx.Panel(self, wx.ID_ANY)

        sizer_1 = wx.BoxSizer(wx.VERTICAL)

        self.notebook_1 = wx.Notebook(self.panel_x, wx.ID_ANY)
        sizer_1.Add(self.notebook_1, 1, wx.EXPAND, 0)

        self.notebook_1_pane_1 = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.notebook_1.AddPage(self.notebook_1_pane_1, "notebook_1_pane_1")

        sizer_1.Add((20, 20), 0, 0, 0)

        self.window_1 = wx.SplitterWindow(self.panel_x, wx.ID_ANY)
        self.window_1.SetMinimumPaneSize(20)
        sizer_1.Add(self.window_1, 1, wx.EXPAND, 0)

        self.window_1_pane_1 = wx.Panel(self.window_1, wx.ID_ANY)

        self.window_1_pane_2_scrolled = wx.ScrolledWindow(self.window_1, wx.ID_ANY, style=wx.TAB_TRAVERSAL)
        self.window_1_pane_2_scrolled.SetScrollRate(10, 10)

        self.html = wx.html.HtmlWindow(self.panel_x, wx.ID_ANY)
        sizer_1.Add(self.html, 1, wx.ALL | wx.EXPAND, 3)

        self.window_1.SplitVertically(self.window_1_pane_1, self.window_1_pane_2_scrolled)

        self.panel_x.SetSizer(sizer_1)

        self.Layout()
        # end wxGlade

# end of class MyFrame 
Example #7
Source File: BasesEtc_Classic.py    From wxGlade with MIT License 4 votes vote down vote up
def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame.__init__
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.SetSize((400, 300))
        self.SetTitle("frame")

        # Menu Bar
        self.frame_menubar = wx.MenuBar()
        self.SetMenuBar(self.frame_menubar)
        # Menu Bar end

        self.frame_statusbar = self.CreateStatusBar(1)
        self.frame_statusbar.SetStatusWidths([-1])
        # statusbar fields
        frame_statusbar_fields = ["frame_statusbar"]
        for i in range(len(frame_statusbar_fields)):
            self.frame_statusbar.SetStatusText(frame_statusbar_fields[i], i)

        # Tool Bar
        self.frame_toolbar = wx.ToolBar(self, -1)
        self.SetToolBar(self.frame_toolbar)
        self.frame_toolbar.Realize()
        # Tool Bar end

        self.panel_x = wx.Panel(self, wx.ID_ANY)

        sizer_1 = wx.BoxSizer(wx.VERTICAL)

        self.notebook_1 = wx.Notebook(self.panel_x, wx.ID_ANY)
        sizer_1.Add(self.notebook_1, 1, wx.EXPAND, 0)

        self.notebook_1_pane_1 = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.notebook_1.AddPage(self.notebook_1_pane_1, "notebook_1_pane_1")

        sizer_1.Add((20, 20), 0, 0, 0)

        self.window_1 = wx.SplitterWindow(self.panel_x, wx.ID_ANY)
        self.window_1.SetMinimumPaneSize(20)
        sizer_1.Add(self.window_1, 1, wx.EXPAND, 0)

        self.window_1_pane_1 = wx.Panel(self.window_1, wx.ID_ANY)

        self.window_1_pane_2_scrolled = wx.ScrolledWindow(self.window_1, wx.ID_ANY, style=wx.TAB_TRAVERSAL)
        self.window_1_pane_2_scrolled.SetScrollRate(10, 10)

        self.html = wx.html.HtmlWindow(self.panel_x, wx.ID_ANY)
        sizer_1.Add(self.html, 1, wx.ALL | wx.EXPAND, 3)

        self.window_1.SplitVertically(self.window_1_pane_1, self.window_1_pane_2_scrolled)

        self.panel_x.SetSizer(sizer_1)

        self.Layout()
        # end wxGlade

# end of class MyFrame 
Example #8
Source File: BasesEtc.py    From wxGlade with MIT License 4 votes vote down vote up
def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame.__init__
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.SetSize((400, 300))
        self.SetTitle("frame")
        
        # Menu Bar
        self.frame_menubar = wx.MenuBar()
        self.SetMenuBar(self.frame_menubar)
        # Menu Bar end
        
        self.frame_statusbar = self.CreateStatusBar(1)
        self.frame_statusbar.SetStatusWidths([-1])
        # statusbar fields
        frame_statusbar_fields = ["frame_statusbar"]
        for i in range(len(frame_statusbar_fields)):
            self.frame_statusbar.SetStatusText(frame_statusbar_fields[i], i)
        
        # Tool Bar
        self.frame_toolbar = wx.ToolBar(self, -1)
        self.frame_toolbar.Realize()
        self.SetToolBar(self.frame_toolbar)
        # Tool Bar end
        
        self.panel_x = wx.Panel(self, wx.ID_ANY)
        
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        
        self.notebook_1 = wx.Notebook(self.panel_x, wx.ID_ANY)
        sizer_1.Add(self.notebook_1, 1, wx.EXPAND, 0)
        
        self.notebook_1_pane_1 = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.notebook_1.AddPage(self.notebook_1_pane_1, "notebook_1_pane_1")
        
        sizer_1.Add((20, 20), 0, 0, 0)
        
        self.window_1 = wx.SplitterWindow(self.panel_x, wx.ID_ANY)
        self.window_1.SetMinimumPaneSize(20)
        sizer_1.Add(self.window_1, 1, wx.EXPAND, 0)
        
        self.window_1_pane_1 = wx.Panel(self.window_1, wx.ID_ANY)
        
        self.window_1_pane_2_scrolled = wxPanel(self.window_1, wx.ID_ANY)
        
        self.html = CustomWidget(self.panel_x, wx.ID_ANY)
        sizer_1.Add(self.html, 1, wx.ALL | wx.EXPAND, 3)
        
        self.window_1.SplitVertically(self.window_1_pane_1, self.window_1_pane_2_scrolled)
        
        self.panel_x.SetSizer(sizer_1)
        
        self.Layout()
        # end wxGlade

# end of class MyFrame