Python wx 模块,SIMPLE_BORDER 实例源码

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

项目:grid    作者:russelg    | 项目源码 | 文件源码
def __init__(self, size=(300, 300), pos=(100, 100)):

        wx.Frame.__init__(self, None, title="Am I transparent?",
                          style=wx.SIMPLE_BORDER | wx.STAY_ON_TOP | wx.FRAME_NO_TASKBAR)
        self.SetClientSize(size)
        self.SetPosition(pos)

        self.alphaValue = 220
        self.alphaIncrement = -4

        pnl = wx.Panel(self)
        # self.changeAlpha_timer = wx.Timer(self)
        # self.changeAlpha_timer.Start(50)
        # self.Bind(wx.EVT_TIMER, self.ChangeAlpha)
        self.MakeTransparent(self.alphaValue)

        self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
项目:SIMreader    作者:stoic1979    | 项目源码 | 文件源码
def __init__(self, parent, SIMcontrol, id=-1):
        wxskinPanel.__init__(self, parent, id, style=wx.SIMPLE_BORDER)
        self.parent = parent
        self.SIM = SIMcontrol
        self.createWidgets()
项目:SIMreader    作者:stoic1979    | 项目源码 | 文件源码
def __init__(self, parent, SIMcontrol, id=-1):
        wxskinPanel.__init__(self, parent, id, style=wx.SIMPLE_BORDER)
        self.parent = parent
        self.SIM = SIMcontrol
        self.createWidgets()
项目:cebl    作者:idfah    | 项目源码 | 文件源码
def initMediaCtrl(self):
        #self.mediaControlBox = ControlBox(self, label='Media', orient=wx.HORIZONTAL)

        self.mediaCtrl = wxm.MediaCtrl(self, style=wx.SIMPLE_BORDER)
        self.mediaCtrl.Hide()
        #self.mediaControlBox.Add(self.mediaCtrl, proportion=1,
        #        flag=wx.ALL | wx.EXPAND, border=10)

        self.Bind(wxm.EVT_MEDIA_STOP, self.onStop)
项目:pyjam    作者:10se1ucgo    | 项目源码 | 文件源码
def __init__(self, parent, file):
        super(WaveformPlot, self).__init__(parent=parent, title="pyjam Waveform Viewer",
                                           style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)

        self.file = file

        self.plot = plot.PlotCanvas(self)
        self.plot.canvas.Bind(wx.EVT_LEFT_DOWN, self.lmb_down)
        self.plot.canvas.Bind(wx.EVT_LEFT_UP, self.lmb_up)
        self.plot.canvas.Bind(wx.EVT_MOTION, self.mouse_motion)
        self.plot.EnableAxesValues = (True, False, False, False)
        self.plot.EnableGrid = (True, False)
        self.plot.AbsScale = (True, False)
        self.plot.EnableAntiAliasing = True

        self.panel = WaveformPanel(self)

        sizer = wx.BoxSizer(wx.HORIZONTAL)
        sizer.Add(self.plot, 1, wx.EXPAND, 0)
        sizer.Add(self.panel, 0, wx.EXPAND, 0)
        self.SetSizerAndFit(sizer)
        self.SetSize(800, self.GetSize()[1])
        self.SetMinSize(self.GetSize())

        self.player = wx.media.MediaCtrl(parent=self, style=wx.SIMPLE_BORDER)

        self.volume = 25
        self.selected = np.array([0.0, 0.0])
        self.maximum = 0.0
        self.minimum = 0.0
        self.selection_drawn = False
        self.resized = False

        self.timer = wx.Timer(self)

        self.Bind(wx.EVT_SIZE, self.on_size)
        self.Bind(wx.EVT_TIMER, self.on_timer)
        self.Bind(wx.EVT_IDLE, self.on_idle)
        self.Bind(wx.EVT_CLOSE, self.on_exit)

        self.load()
项目:imagepy    作者:Image-Py    | 项目源码 | 文件源码
def __init__(self, parent):
        wx.Panel.__init__ ( self, parent, id = wx.ID_ANY, 
                            pos = wx.DefaultPosition, size = wx.Size(256,80), 
                            style = wx.SIMPLE_BORDER|wx.TAB_TRAVERSAL )
        self.init_buf()
        self.data, self.extent = [], [0,0,1,1]
        self.set_title_label('Graph', 'X-unit', 'Y-unit')
        self.update = False

        self.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )
        self.Bind(wx.EVT_SIZE, self.on_size)
        self.Bind(wx.EVT_PAINT, self.on_paint)
        self.Bind(wx.EVT_IDLE, self.on_idle)
        self.Bind(wx.EVT_MOTION, self.on_move )
项目:MechWarfareScoring    作者:artanz    | 项目源码 | 文件源码
def __init__( self, parent, camera, socketclient ):
        wx.Panel.__init__( self, parent, id=wx.ID_ANY, style=wx.SIMPLE_BORDER )

        self.Camera = camera
        self.SocketClient = socketclient

        self.Bind( wx.EVT_PAINT, self.OnPaint )
        self.Bind( wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground )

        self.SetSize( CAMERA_SIZE )
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def __init__(self, controller_uid):
        UIViewBase.__init__(self, controller_uid)
        wx.Panel.__init__(self, self._get_lpeview_notebook(), -1, style=wx.SIMPLE_BORDER)
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def __init__(self, controller_uid):
        UIViewBase.__init__(self, controller_uid)
        wx.Panel.__init__(self, self._get_lpeview_notebook(), -1, style=wx.SIMPLE_BORDER)
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def _get_inside_panel_grid(self):
        panel = wx.Panel(self, style=wx.SIMPLE_BORDER)
        tp = TracksPanel(panel, self.model)
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(tp, 1, wx.EXPAND|wx.ALL, border=10)
        panel.SetSizer(sizer)
        self.true_panel = tp
        return panel
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def _get_inside_panel_curves(self):
        panel = wx.Panel(self, style=wx.SIMPLE_BORDER)
        cp = CurvesPanel(panel, self.welluid, self.model)
        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(cp, 1, wx.EXPAND|wx.ALL, border=10)
        panel.SetSizer(sizer)
        self.true_panel = cp
        return panel    





######################################################################
项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def __init__(self, parent, controller, tagname, title):
        """
        Constructor
        @param parent: Parent wx.Window of dialog for modal
        @param controller: Reference to project controller
        @param tagname: Tagname of project POU edited
        @param title: Title of dialog frame
        """
        wx.Dialog.__init__(self, parent, title=title)

        # Save reference to
        self.Controller = controller
        self.TagName = tagname

        # Label for preview
        self.PreviewLabel = wx.StaticText(self, label=_('Preview:'))

        # Create Preview panel
        self.Preview = wx.Panel(self, style=wx.SIMPLE_BORDER)
        self.Preview.SetBackgroundColour(wx.WHITE)

        # Add function to preview panel so that it answers to graphic elements
        # like Viewer
        setattr(self.Preview, "GetDrawingMode", lambda: FREEDRAWING_MODE)
        setattr(self.Preview, "GetScaling", lambda: None)
        setattr(self.Preview, "GetBlockType", controller.GetBlockType)
        setattr(self.Preview, "IsOfType", controller.IsOfType)

        # Bind paint event on Preview panel
        self.Preview.Bind(wx.EVT_PAINT, self.OnPaint)

        # Add default dialog buttons sizer
        self.ButtonSizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
        self.Bind(wx.EVT_BUTTON, self.OnOK,
                  self.ButtonSizer.GetAffirmativeButton())

        self.Element = None            # Graphic element to display in preview
        self.MinElementSize = None     # Graphic element minimal size

        # Variable containing the graphic element name when dialog is opened
        self.DefaultElementName = None
        self.Fit()

        # List of variables defined in POU {var_name: (var_class, var_type),...}
        self.VariableList = {}
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
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)
项目:PAWS    作者:Moonbase59    | 项目源码 | 文件源码
def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Frame.__init__(self, id=wxID_TFRAME, name='TFrame', parent=prnt,
              pos=wx.Point(254, 241), size=wx.Size(829, 786),
              style=wx.DEFAULT_FRAME_STYLE, title=u'PAWS Terminal')
        self._init_utils()
        self.SetClientSize(wx.Size(821, 748))
        self.SetMenuBar(self.TMenuBar)
        self.SetAutoLayout(True)
        self.SetToolTipString('TFrame')
        self.SetMinSize(wx.Size(-1, 21))

        self.TStatusBar = wx.StatusBar(id=wxID_TFRAMETSTATUSBAR,
              name='TStatusBar', parent=self, style=0)
        self.TStatusBar.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD, False,
              u'Courier New'))
        self._init_coll_TStatusBar_Fields(self.TStatusBar)
        self.SetStatusBar(self.TStatusBar)

        self.TInput = wx.TextCtrl(id=wxID_TFRAMETINPUT, name='TInput',
              parent=self, pos=wx.Point(1, 728), size=wx.Size(819, 20),
              style=wx.SIMPLE_BORDER | wx.TE_PROCESS_ENTER, value="''")
        self.TInput.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD, False,
              u'Courier'))
        self.TInput.SetToolTipString(u'Type command here.')
        self.TInput.SetAutoLayout(False)
        self.TInput.SetEditable(True)
        self.TInput.Enable(False)
        self.TInput.Bind(wx.EVT_TEXT_ENTER, self.OnTInputTextEnter,
              id=wxID_TFRAMETINPUT)

        self.TDisplay = wx.TextCtrl(id=wxID_TFRAMETDISPLAY, name='TDisplay',
              parent=self, pos=wx.Point(0, 0), size=wx.Size(821, 728),
              style=wx.TE_RICH2 | wx.TE_MULTILINE | wx.TE_READONLY,
              value=u'To run a game, choose File ? Pick Game … then choose a game from the list.')
        self.TDisplay.SetMinSize(wx.Size(517, 440))
        self.TDisplay.SetEditable(False)
        self.TDisplay.SetToolTipString(u"Game's output displays here.")
        self.TDisplay.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.NORMAL, False,
              u'Arial'))
        self.TDisplay.Enable(True)

        self._init_sizers()