当前位置: 首页>>代码示例>>Python>>正文


Python wx.SIMPLE_BORDER属性代码示例

本文整理汇总了Python中wx.SIMPLE_BORDER属性的典型用法代码示例。如果您正苦于以下问题:Python wx.SIMPLE_BORDER属性的具体用法?Python wx.SIMPLE_BORDER怎么用?Python wx.SIMPLE_BORDER使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在wx的用法示例。


在下文中一共展示了wx.SIMPLE_BORDER属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import SIMPLE_BORDER [as 别名]
def __init__(self, parent):
        """Constructor, creating the reader toolbar."""
        wx.ToolBar.__init__(
           self,
           parent,
           pos=wx.DefaultPosition,
           size=wx.DefaultSize,
           style=wx.SIMPLE_BORDER | wx.TB_HORIZONTAL | wx.TB_FLAT | wx.TB_TEXT,
           name='Reader Toolbar')

        # create bitmaps for toolbar
        tsize = (16, 16)
        if None != ICO_READER:
            bmpReader = wx.Bitmap(ICO_READER, wx.BITMAP_TYPE_ICO)
        else:
            bmpReader = wx.ArtProvider_GetBitmap(
                wx.ART_HELP_BOOK, wx.ART_OTHER, tsize)
        if None != ICO_SMARTCARD:
            bmpCard = wx.Bitmap(ICO_SMARTCARD, wx.BITMAP_TYPE_ICO)
        else:
            bmpCard = wx.ArtProvider_GetBitmap(
                wx.ART_HELP_BOOK, wx.ART_OTHER, tsize)
        self.readercombobox = ReaderComboBox(self)

        # create and add controls
        self.AddSimpleTool(
            10,
            bmpReader,
            "Select smart card reader",
            "Select smart card reader")
        self.AddControl(self.readercombobox)
        self.AddSeparator()
        self.AddSimpleTool(
            20,
            bmpCard, "Connect to smartcard",
            "Connect to smart card")
        self.AddSeparator()

        self.Realize() 
开发者ID:LudovicRousseau,项目名称:pyscard,代码行数:41,代码来源:ReaderToolbar.py

示例2: popup_at_button

# 需要导入模块: import wx [as 别名]
# 或者: from wx import SIMPLE_BORDER [as 别名]
def popup_at_button(self, button):
        """Initialize a popup at button position."""
        pop = self.BezelEntryPopup(self, wx.SIMPLE_BORDER)
        return pop 
开发者ID:hhannine,项目名称:superpaper,代码行数:6,代码来源:gui.py

示例3: create_widget

# 需要导入模块: import wx [as 别名]
# 或者: from wx import SIMPLE_BORDER [as 别名]
def create_widget(self):
        style = wx.SIMPLE_BORDER | wx.FULL_REPAINT_ON_RESIZE
        self.widget = wx.Window(self.parent_window.widget, self.id, size=(self.width, self.height), style=style)
        self.widget.GetBestSize = self.widget.GetSize
        self.widget.Bind(wx.EVT_PAINT, self.on_paint) 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:7,代码来源:spacer.py

示例4: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import SIMPLE_BORDER [as 别名]
def __init__(self):
        wx.Frame.__init__(
            self,
            None,
            -1,
            'MPCgotoFrame',
            style=wx.STAY_ON_TOP | wx.SIMPLE_BORDER,
        )
        self.GoToCtrl = None
        self.pos = -1
        self.posList = (0,1,3,4,6,7)
        self.gotowin = None
        self.total = None
        self.evtList = [[],[],[],[],[]]
        self.plugin = None 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:17,代码来源:__init__.py

示例5: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import SIMPLE_BORDER [as 别名]
def __init__(self, parent, startFunc, endFunc):
        self.startFunc = startFunc
        self.endFunc = endFunc

        self.text = eg.plugins.Window.FindWindow.text
        wx.PyWindow.__init__(self, parent, -1, style=wx.SIMPLE_BORDER)
        self.SetBackgroundColour(
            wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOW)
        )
        self.lastTarget = None

        # load images
        self.dragBoxBitmap = GetInternalBitmap("findert")
        image = GetInternalImage('findertc')
        image.SetMaskColour(255, 0, 0)

        # since this image didn't come from a .cur file, tell it where the
        # hotspot is
        image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_X, 15)
        image.SetOptionInt(wx.IMAGE_OPTION_CUR_HOTSPOT_Y, 16)

        # make the image into a cursor
        self.cursor = wx.CursorFromImage(image)

        # the image of the drag target
        dragBoxImage = wx.StaticBitmap(self, -1, self.dragBoxBitmap)
        dragBoxImage.SetMinSize(self.dragBoxBitmap.GetSize())
        dragBoxImage.Bind(wx.EVT_LEFT_DOWN, self.OnDragboxClick)
        self.dragBoxImage = dragBoxImage

        # some description for the drag target
        dragBoxText = wx.StaticText(
            self,
            -1,
            self.text.drag2,
            style=wx.ALIGN_CENTRE
        )
        x1, y1 = dragBoxText.GetBestSize()
        dragBoxText.SetLabel(self.text.drag1)
        x2, y2 = dragBoxText.GetBestSize()
        dragBoxText.SetMinSize((max(x1, x2), max(y1, y2)))
        #dragBoxText.Bind(wx.EVT_LEFT_DOWN, self.OnDragboxClick)
        self.dragBoxText = dragBoxText

        self.Bind(wx.EVT_SIZE, self.OnSize)

        # put our drag target together
        sizer = wx.BoxSizer(wx.HORIZONTAL)
        sizer.Add(dragBoxImage, 0, wx.ALIGN_CENTER_VERTICAL)
        sizer.Add(dragBoxText, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL)
        self.SetSizer(sizer)
        self.SetAutoLayout(True)
        sizer.Fit(self)
        self.SetMinSize(self.GetSize())
        wx.CallAfter(self.dragBoxImage.SetBitmap, self.dragBoxBitmap) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:57,代码来源:WindowDragFinder.py

示例6: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import SIMPLE_BORDER [as 别名]
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 = {} 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:47,代码来源:BlockPreviewDialog.py


注:本文中的wx.SIMPLE_BORDER属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。