Python wx 模块,SP_3D 实例源码

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

项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def _init_ctrls(self, parent):
        wx.SplitterWindow.__init__(self, parent,
                                   style=wx.SUNKEN_BORDER | wx.SP_3D)
        self.SetMinimumPaneSize(1)

        self._init_MenuItems()

        if self.VARIABLE_PANEL_TYPE is not None:
            self.VariableEditor = VariablePanel(self, self, self.Controler, self.VARIABLE_PANEL_TYPE, self.Debug)
            self.VariableEditor.SetTagName(self.TagName)
        else:
            self.VariableEditor = None

        self._init_Editor(self)

        if self.Editor is not None and self.VariableEditor is not None:
            self.SplitHorizontally(self.VariableEditor, self.Editor, 200)
        elif self.VariableEditor is not None:
            self.Initialize(self.VariableEditor)
        elif self.Editor is not None:
            self.Initialize(self.Editor)
项目:smartschool    作者:asifkodur    | 项目源码 | 文件源码
def __init__(self, *args, **kwds):
        # begin wxGlade: help_window.__init__
        kwds["style"] = wx.MAXIMIZE | wx.CLOSE_BOX | wx.THICK_FRAME|wx.CAPTION
        wx.Dialog.__init__(self, *args, **kwds)
        self.window_1 = wx.SplitterWindow(self, wx.ID_ANY, style=wx.SP_3D | wx.SP_BORDER)
        self.window_1_pane_left = wx.Panel(self.window_1, wx.ID_ANY)
        self.html_left = html.HtmlWindow(self.window_1_pane_left, wx.ID_ANY, size=(1, 1))
        self.window_1_pane_right = wx.Panel(self.window_1, wx.ID_ANY)
        self.html_right = html.HtmlWindow(self.window_1_pane_right, wx.ID_ANY, size=(1, 1))

        #self.Bind(wx.EVT_COself.on_hyperlink,self.html_left)
        self.Bind(wx.html.EVT_HTML_LINK_CLICKED,self.on_hyperlink,self.html_left)
        #self.Bind(wx.EVT_SIZE,self.on_resize)

        self.__set_properties()
        self.__do_layout()
        #self.on_resize(None)
        self.load_htmlpage()
        # end wxGlade
项目:dxf2gcode    作者:cnc-club    | 项目源码 | 文件源码
def __init__(self, parent, id, title):
        wx.Frame.__init__(self,parent,wx.ID_ANY, title, size=(600, 600), pos=(200, 200))

        self.splitter_window = wx.SplitterWindow(self, -1, style=wx.SP_3D|wx.SP_BORDER)
        self.splitter_window.SetMinimumPaneSize(20)
        self.left_panel = wx.Panel(self.splitter_window, -1)
        self.right_panel = wx.Panel(self.splitter_window, -1)

        self.tree = CT.CustomTreeCtrl(self.left_panel, 1002, pos=(0, 0), 
            style=wx.TR_DEFAULT_STYLE | 
            wx.TR_HAS_VARIABLE_ROW_HEIGHT | 
            wx.TR_HAS_BUTTONS | 
            wx.TR_FULL_ROW_HIGHLIGHT | 
            wx.TR_MULTIPLE | 
            wx.TR_EDIT_LABELS)
        self.root = self.tree.AddRoot("Root Item")

        offset_lists = ["Clearance Reports", "Other Offsets"]
        offset_list_combo_box = wx.ComboBox(self.right_panel, -1, choices=offset_lists)

        #Sizers
        offset_sizer = wx.BoxSizer(wx.VERTICAL)
        offset_sizer.Add(offset_list_combo_box, 0, wx.EXPAND)
        vbox = wx.BoxSizer(wx.VERTICAL)
        vbox.Add(self.tree, 1, wx.EXPAND)
        self.left_panel.SetSizer(vbox)
        vbox2 = wx.BoxSizer(wx.VERTICAL)
        vbox2.Add(offset_sizer, 1, wx.EXPAND)
        self.right_panel.SetSizer(vbox2)
        main_sizer = wx.BoxSizer(wx.HORIZONTAL)
        self.splitter_window.SplitVertically(self.left_panel, self.right_panel)
        main_sizer.Add(self.splitter_window, 1, wx.EXPAND)
        self.SetSizer(main_sizer)

        self.Bind(wx.EVT_TREE_END_LABEL_EDIT, self.OnEndLabelEdit)
        self.Bind(wx.EVT_TREE_BEGIN_LABEL_EDIT, self.OnBeginLabelEdit)
        self.Bind(wx.EVT_KEY_DOWN, self.enterpressed)
        self.tree.Bind(wx.EVT_KEY_DOWN, self.enterpressed)
        self.Bind(wx.EVT_KEY_DOWN, self.enterpressed, self.tree)
        self.Bind(wx.EVT_COMMAND_ENTER, self.enterpressed)
        self.Bind(wx.EVT_TEXT_ENTER, self.enterpressed)

        self.Show(True)
项目:augment3D    作者:yulkang    | 项目源码 | 文件源码
def __init__(self, parent, title):
        """Create the pydicom image example's main frame window."""

        wx.Frame.__init__(self, parent, id=-1, title="", pos=wx.DefaultPosition,
                          size=wx.Size(w=1024, h=768),
                          style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN)

        # --------------------------------------------------------
        # Set up the menubar.
        # --------------------------------------------------------
        self.mainmenu = wx.MenuBar()

        # Make the 'File' menu.
        menu = wx.Menu()
        item = menu.Append(wx.ID_ANY, '&Open', 'Open file for editing')
        self.Bind(wx.EVT_MENU, self.OnFileOpen, item)
        item = menu.Append(wx.ID_ANY, 'E&xit', 'Exit Program')
        self.Bind(wx.EVT_MENU, self.OnFileExit, item)
        self.mainmenu.Append(menu, '&File')

        # Attach the menu bar to the window.
        self.SetMenuBar(self.mainmenu)

        # --------------------------------------------------------
        # Set up the main splitter window.
        # --------------------------------------------------------
        self.mainSplitter = wx.SplitterWindow(self, style=wx.NO_3D | wx.SP_3D)
        self.mainSplitter.SetMinimumPaneSize(1)

        # -------------------------------------------------------------
        # Create the folderTreeView on the left.
        # -------------------------------------------------------------
        self.dsTreeView = wx.TreeCtrl(self.mainSplitter, style=wx.TR_LINES_AT_ROOT | wx.TR_HAS_BUTTONS)

        # --------------------------------------------------------
        # Create the ImageView on the right pane.
        # --------------------------------------------------------
        self.imView = wx.Panel(self.mainSplitter, style=wx.VSCROLL | wx.HSCROLL | wx.CLIP_CHILDREN)
        self.imView.Bind(wx.EVT_PAINT, self.OnPaint)
        self.imView.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground)
        self.imView.Bind(wx.EVT_SIZE, self.OnSize)

        # --------------------------------------------------------
        # Install the splitter panes.
        # --------------------------------------------------------
        self.mainSplitter.SplitVertically(self.dsTreeView, self.imView)
        self.mainSplitter.SetSashPosition(300, True)

        # --------------------------------------------------------
        # Initialize some values
        # --------------------------------------------------------
        self.dcmdsRoot = False
        self.foldersRoot = False
        self.loadCentered = True
        self.bitmap = None
        self.Show(True)
项目:bids    作者:robertoostenveld    | 项目源码 | 文件源码
def __init__(self, parent, title):
        """Create the pydicom image example's main frame window."""

        wx.Frame.__init__(self, parent, id=-1, title="", pos=wx.DefaultPosition,
                          size=wx.Size(w=1024, h=768),
                          style=wx.DEFAULT_FRAME_STYLE | wx.SUNKEN_BORDER | wx.CLIP_CHILDREN)

        # --------------------------------------------------------
        # Set up the menubar.
        # --------------------------------------------------------
        self.mainmenu = wx.MenuBar()

        # Make the 'File' menu.
        menu = wx.Menu()
        item = menu.Append(wx.ID_ANY, '&Open', 'Open file for editing')
        self.Bind(wx.EVT_MENU, self.OnFileOpen, item)
        item = menu.Append(wx.ID_ANY, 'E&xit', 'Exit Program')
        self.Bind(wx.EVT_MENU, self.OnFileExit, item)
        self.mainmenu.Append(menu, '&File')

        # Attach the menu bar to the window.
        self.SetMenuBar(self.mainmenu)

        # --------------------------------------------------------
        # Set up the main splitter window.
        # --------------------------------------------------------
        self.mainSplitter = wx.SplitterWindow(self, style=wx.NO_3D | wx.SP_3D)
        self.mainSplitter.SetMinimumPaneSize(1)

        # -------------------------------------------------------------
        # Create the folderTreeView on the left.
        # -------------------------------------------------------------
        self.dsTreeView = wx.TreeCtrl(self.mainSplitter, style=wx.TR_LINES_AT_ROOT | wx.TR_HAS_BUTTONS)

        # --------------------------------------------------------
        # Create the ImageView on the right pane.
        # --------------------------------------------------------
        self.imView = wx.Panel(self.mainSplitter, style=wx.VSCROLL | wx.HSCROLL | wx.CLIP_CHILDREN)
        self.imView.Bind(wx.EVT_PAINT, self.OnPaint)
        self.imView.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground)
        self.imView.Bind(wx.EVT_SIZE, self.OnSize)

        # --------------------------------------------------------
        # Install the splitter panes.
        # --------------------------------------------------------
        self.mainSplitter.SplitVertically(self.dsTreeView, self.imView)
        self.mainSplitter.SetSashPosition(300, True)

        # --------------------------------------------------------
        # Initialize some values
        # --------------------------------------------------------
        self.dcmdsRoot = False
        self.foldersRoot = False
        self.loadCentered = True
        self.bitmap = None
        self.Show(True)