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


Python wx.NO_BORDER属性代码示例

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


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

示例1: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NO_BORDER [as 别名]
def __init__(self, parent, id):
        wx.Panel.__init__(
            self, parent, id,
            # wxMSW/Windows does not seem to support
            # wx.NO_BORDER, which sucks
            style = wx.WANTS_CHARS | wx.NO_BORDER)

        hsizer = wx.BoxSizer(wx.HORIZONTAL)

        self.scrollBar = wx.ScrollBar(self, -1, style = wx.SB_VERTICAL)
        self.ctrl = MyCtrl(self, -1)

        hsizer.Add(self.ctrl, 1, wx.EXPAND)
        hsizer.Add(self.scrollBar, 0, wx.EXPAND)

        wx.EVT_COMMAND_SCROLL(self, self.scrollBar.GetId(),
                              self.ctrl.OnScroll)

        wx.EVT_SET_FOCUS(self.scrollBar, self.OnScrollbarFocus)

        self.SetSizer(hsizer)

    # we never want the scrollbar to get the keyboard focus, pass it on to
    # the main widget 
开发者ID:trelby,项目名称:trelby,代码行数:26,代码来源:trelby.py

示例2: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NO_BORDER [as 别名]
def __init__(self, parent, wxid=wx.ID_ANY):
        images = {}
        tips = {}
        a = wx.GetApp()
        for k in self.states.keys():
            i = a.theme_library.get(('statuslight', self.states[k][0]))
            b = wx.BitmapFromImage(i)
            images[k] = b

        _StatusLight.__init__(self)
        wx.Panel.__init__(self, parent, id=wxid, style=wx.NO_BORDER)
        self.SetSize(wx.Size(24,24))
        self.bitmap = wx.StaticBitmap(self, wx.ID_ANY)

        self.images = images
        self.tips = tips

        self.Fit()

        self.change_state() 
开发者ID:kenorb-contrib,项目名称:BitTorrent,代码行数:22,代码来源:StatusLight.py

示例3: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NO_BORDER [as 别名]
def __init__(self, parent):
        wx.Frame.__init__(
            self,
            parent,
            -1,
            "OSD Window",
            size=(0, 0),
            style=(
                wx.FRAME_SHAPED |
                wx.NO_BORDER |
                wx.FRAME_NO_TASKBAR |
                wx.STAY_ON_TOP
            )
        )
        self.hwnd = self.GetHandle()
        self.bitmap = wx.EmptyBitmap(0, 0)
        # we need a timer to possibly cancel it
        self.timer = threading.Timer(0.0, eg.DummyFunc)
        self.Bind(wx.EVT_PAINT, self.OnPaint)
        self.Bind(wx.EVT_CLOSE, self.OnClose) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:22,代码来源:ShowOSD.py

示例4: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NO_BORDER [as 别名]
def __init__(self, size=(-1, -1), pic_path=None, display=0):
        wx.Frame.__init__(
            self,
            None,
            -1,
            "ShowPictureFrame",
            style=wx.NO_BORDER | wx.FRAME_NO_TASKBAR  #| wx.STAY_ON_TOP
        )
        self.SetBackgroundColour(wx.Colour(0, 0, 0))
        self.Bind(wx.EVT_LEFT_DCLICK, self.LeftDblClick)
        self.Bind(wx.EVT_CLOSE, self.OnClose)
        bitmap = wx.EmptyBitmap(1, 1)
        self.staticBitmap = wx.StaticBitmap(self, -1, bitmap)
        self.staticBitmap.Bind(wx.EVT_LEFT_DCLICK, self.LeftDblClick)
        self.staticBitmap.Bind(wx.EVT_MOTION, self.ShowCursor)
        self.timer = Timer(2.0, self.HideCursor) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:18,代码来源:__init__.py

示例5: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NO_BORDER [as 别名]
def __init__(self, plugin, pos, alwaysOnTop):
        style = wx.SYSTEM_MENU|wx.MINIMIZE_BOX|wx.CLIP_CHILDREN|wx.CLOSE_BOX
        if not plugin.showInTaskbar:
            style |= wx.FRAME_NO_TASKBAR
        if plugin.windowStyle == 0:
            style |= wx.CAPTION
        elif plugin.windowStyle == 1:
            style |= wx.RAISED_BORDER
        elif plugin.windowStyle == 2:
            style |= wx.NO_BORDER|wx.FRAME_SHAPED
        if alwaysOnTop:
            style |= wx.STAY_ON_TOP
        wx.Frame.__init__(
            self,
            None,
            title=plugin.caption,
            pos=pos,
            style=style
        )
        self.SetBackgroundColour(plugin.windowColour) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:22,代码来源:__init__.py

示例6: _init_ctrls

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NO_BORDER [as 别名]
def _init_ctrls(self, prnt):
        self.HeaderLabel = wx.StaticText(id=ID_SEARCHRESULTPANELHEADERLABEL,
                                         name='HeaderLabel', parent=self,
                                         pos=wx.Point(0, 0), size=wx.Size(0, 17), style=0)

        search_results_tree_style = CT.TR_HAS_BUTTONS | CT.TR_NO_LINES | CT.TR_HAS_VARIABLE_ROW_HEIGHT
        self.SearchResultsTree = CT.CustomTreeCtrl(id=ID_SEARCHRESULTPANELSEARCHRESULTSTREE,
                                                   name="SearchResultsTree", parent=self,
                                                   pos=wx.Point(0, 0), style=search_results_tree_style)
        if wx.VERSION >= (2, 8, 11):
            self.SearchResultsTree.SetAGWWindowStyleFlag(search_results_tree_style)
        self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.OnSearchResultsTreeItemActivated,
                  id=ID_SEARCHRESULTPANELSEARCHRESULTSTREE)

        self.ResetButton = wx.lib.buttons.GenBitmapButton(
            self, bitmap=GetBitmap("reset"),
            size=wx.Size(28, 28), style=wx.NO_BORDER)
        self.ResetButton.SetToolTipString(_("Reset search result"))
        self.Bind(wx.EVT_BUTTON, self.OnResetButton, self.ResetButton)

        self._init_sizers() 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:23,代码来源:SearchResultPanel.py

示例7: _init_ui

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NO_BORDER [as 别名]
def _init_ui(self):
        """Initialize UI components."""
        # Add layout management
        self.hbox = wx.BoxSizer(wx.HORIZONTAL)
        self.fgs = wx.FlexGridSizer(rows=self.n_items, cols=2, vgap=0, hgap=2)

        # Create items to add
        for _i, (key, value) in enumerate(zip(self.labels, self.colors)):
            self.label = wx.StaticText(self,
                                       label=str(key),
                                       style=wx.ALIGN_LEFT,
                                       )

            self.colorbox = csel.ColourSelect(self,
                                              _i,
                                              "",
                                              tuple(value),
                                              style=wx.NO_BORDER,
                                              size=(20, 20))

            self.Bind(csel.EVT_COLOURSELECT, self.on_color_pick, id=_i)

            self.fgs.Add(self.label, flag=wx.ALIGN_CENTER_VERTICAL)
            self.fgs.Add(self.colorbox)

        # Add our items to the layout manager and set the sizer.
        self.hbox.Add(self.fgs)
        self.SetSizer(self.hbox) 
开发者ID:dougthor42,项目名称:wafer_map,代码行数:30,代码来源:wm_legend.py

示例8: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NO_BORDER [as 别名]
def __init__(self, parent, id=wx.ID_ANY, label="", pos=wx.DefaultPosition,
                 size=wx.DefaultSize, style=wx.NO_BORDER, validator=wx.DefaultValidator,
                 name="roundbutton"):
        """
        Default class constructor.

        :param `parent`: the L{RoundButton} parent;
        :param `id`: window identifier. A value of -1 indicates a default value;
        :param `label`: the button text label;
        :param `pos`: the control position. A value of (-1, -1) indicates a default position,
         chosen by either the windowing system or wxPython, depending on platform;
        :param `size`: the control size. A value of (-1, -1) indicates a default size,
         chosen by either the windowing system or wxPython, depending on platform;
        :param `style`: the button style (unused);
        :param `validator`: the validator associated to the button;
        :param `name`: the button name.
        """
        
        wx.PyControl.__init__(self, parent, id, pos, size, style, validator, name)

        self.Bind(wx.EVT_PAINT, self.OnPaint)
        self.Bind(wx.EVT_ERASE_BACKGROUND, lambda event: None)
        self.Bind(wx.EVT_SIZE, self.OnSize)
        self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
        self.Bind(wx.EVT_LEFT_UP, self.OnLeftUp)
        self.Bind(wx.EVT_LEAVE_WINDOW, self.OnMouseLeave)
        self.Bind(wx.EVT_ENTER_WINDOW, self.OnMouseEnter)
        self.Bind(wx.EVT_SET_FOCUS, self.OnGainFocus)
        self.Bind(wx.EVT_KILL_FOCUS, self.OnLoseFocus)
        self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown)
        self.Bind(wx.EVT_KEY_UP, self.OnKeyUp)

        self.Bind(wx.EVT_LEFT_DCLICK, self.OnLeftDown)

        self._mouseAction = None
        self._hasFocus = False
        self._buttonRadius = 0
        
        self.SetLabel(label)
        self.InheritAttributes()
        self.SetInitialSize(size) 
开发者ID:ActiveState,项目名称:code,代码行数:43,代码来源:recipe-577951.py

示例9: CreateNotebook

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NO_BORDER [as 别名]
def CreateNotebook(self):
        bookStyle = aui.AUI_NB_DEFAULT_STYLE
        # bookStyle &= ~(aui.AUI_NB_CLOSE_ON_ACTIVE_TAB)

        bookStyle = aui.AUI_NB_DEFAULT_STYLE | aui.AUI_NB_TAB_EXTERNAL_MOVE | wx.NO_BORDER

        client_size = self.GetClientSize()
        nb = aui.AuiNotebook(self, -1, wx.Point(client_size.x, client_size.y), wx.Size(430, 200), agwStyle=bookStyle)

        nb.AddPage(ListPanel(self, self, self.controller._model, self.controller._interp), "Main")

        return nb 
开发者ID:xmendez,项目名称:wfuzz,代码行数:14,代码来源:guicontrols.py

示例10: _create_bitmap_button

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NO_BORDER [as 别名]
def _create_bitmap_button(self, icon, size=(-1, -1), handler=None):
        button = wx.BitmapButton(self._panel, bitmap=icon, size=size, style=wx.NO_BORDER)

        if handler is not None:
            button.Bind(wx.EVT_BUTTON, handler)

        return button 
开发者ID:MrS0m30n3,项目名称:youtube-dl-gui,代码行数:9,代码来源:mainframe.py

示例11: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NO_BORDER [as 别名]
def __init__(self, parent, fontsize, average, maximum, title,
                 formatting_string, vertical=False, grid=False):
        wx.Frame.__init__(self, parent, style=wx.NO_BORDER)
        self.panel = wx.Panel(parent=self)
        self.fontsize = fontsize
        self.average = average
        self.vertical = vertical
        self.grid = grid  # grid layout may not be implemented in webkit
        # TODO: average not used yet here
        # TODO: vertical not supported

        # maximum, title and formatting_string are lists
        self.list_maximum = maximum
        self.list_title = title
        self.list_formatting_string = formatting_string

        self.sizer = wx.BoxSizer(wx.VERTICAL)
        if webview:
            self.textCtrl = webview.WebView.New(self)
            values=[None] * len(title)
            html = self._content_grid(values) if self.grid else self._content_table(values)
            self.textCtrl.SetPage(html, '')
            self.sizer.Add(self.textCtrl, 1, wx.ALL | wx.ALIGN_CENTER | wx.EXPAND, 5)

        self.SetSizer(self.sizer)
        self.sizer.Fit(self.panel) 
开发者ID:tangible-landscape,项目名称:grass-tangible-landscape,代码行数:28,代码来源:activities_dashboard.py

示例12: create_editor

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NO_BORDER [as 别名]
def create_editor(self, panel, sizer):
        label = self._find_label()
        style = wx.RA_SPECIFY_COLS | wx.NO_BORDER | wx.CLIP_CHILDREN
        self.options = wx.RadioBox(panel, -1, label, choices=self.labels, majorDimension=self.columns, style=style)
        sizer.Add(self.options, 0, wx.EXPAND)

        if self.tooltips:
            for i,tooltip in enumerate(self.tooltips):
                if tooltip:
                    self.options.SetItemToolTip(i, tooltip)
        else:
            self._set_tooltip(self.options)

        self.update_display(True)
        self.options.Bind(wx.EVT_RADIOBOX, self.on_radio) 
开发者ID:wxGlade,项目名称:wxGlade,代码行数:17,代码来源:new_properties.py

示例13: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NO_BORDER [as 别名]
def __init__(self, parent, id=-1, label='', pos=(-1, -1), size=(-1, -1)):
        wx.PyWindow.__init__(
            self,
            parent,
            id,
            pos,
            size,
            style=wx.SUNKEN_BORDER
        )
        self.SetMinSize(self.GetSize())
        sizer = wx.BoxSizer(wx.VERTICAL)
        textCtrl = wx.TextCtrl(
            self,
            -1,
            label,
            style=(
                wx.TE_MULTILINE |
                wx.TE_NO_VSCROLL |
                wx.NO_BORDER |
                wx.TE_READONLY
            )
        )
        textCtrl.SetBackgroundColour(self.GetBackgroundColour())
        #sizer.Add((0,0), 1, wx.EXPAND)
        sizer.Add(textCtrl, 0, wx.EXPAND | wx.ALL, 3)
        sizer.Add((0, 0), 1, wx.EXPAND)
        self.SetSizer(sizer)
        self.Bind(wx.EVT_SIZE, self.OnSize)
        self.textCtrl = textCtrl 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:31,代码来源:StaticTextBox.py

示例14: __init__

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NO_BORDER [as 别名]
def __init__(self, parent=None):
        wx.Frame.__init__(
            self,
            parent,
            style=wx.NO_BORDER|wx.FRAME_NO_TASKBAR|wx.CLIP_CHILDREN
        )
        self.drawing = None
        self.displayNum = 0
        self.Bind(wx.EVT_PAINT, self.OnPaint)
        self.Bind(wx.EVT_LEFT_DCLICK, self.LeftDblClick)
        self.Bind(wx.EVT_KEY_DOWN, self.OnChar)
        self.Bind(wx.EVT_MOTION, self.ShowCursor)
        self.timer = None
        self.SetBackgroundColour((0, 0, 0)) 
开发者ID:EventGhost,项目名称:EventGhost,代码行数:16,代码来源:__init__.py

示例15: GenerateMethodButtonSizer

# 需要导入模块: import wx [as 别名]
# 或者: from wx import NO_BORDER [as 别名]
def GenerateMethodButtonSizer(self):
        normal_bt_font = wx.Font(faces["size"] // 3,    wx.DEFAULT, wx.NORMAL, wx.NORMAL, faceName=faces["helv"])
        mouseover_bt_font = wx.Font(faces["size"] // 3, wx.DEFAULT, wx.NORMAL, wx.NORMAL, faceName=faces["helv"], underline=True)

        msizer = wx.BoxSizer(wx.HORIZONTAL)

        for confnode_method in self.Controler.ConfNodeMethods:
            if "method" in confnode_method and confnode_method.get("shown", True):
                button = GenBitmapTextButton(self.Editor,
                                             bitmap=GetBitmap(confnode_method.get("bitmap", "Unknown")),
                                             label=confnode_method["name"],
                                             style=wx.NO_BORDER)
                button.SetFont(normal_bt_font)
                button.SetToolTipString(confnode_method["tooltip"])
                if confnode_method.get("push", False):
                    button.Bind(wx.EVT_LEFT_DOWN, self.GetButtonCallBackFunction(confnode_method["method"], True))
                else:
                    button.Bind(wx.EVT_BUTTON, self.GetButtonCallBackFunction(confnode_method["method"]), button)
                # a fancy underline on mouseover

                def setFontStyle(b, s):
                    def fn(event):
                        b.SetFont(s)
                        b.Refresh()
                        event.Skip()
                    return fn
                button.Bind(wx.EVT_ENTER_WINDOW, setFontStyle(button, mouseover_bt_font))
                button.Bind(wx.EVT_LEAVE_WINDOW, setFontStyle(button, normal_bt_font))
                # hack to force size to mini
                if not confnode_method.get("enabled", True):
                    button.Disable()
                msizer.AddWindow(button, flag=wx.ALIGN_CENTER)
        return msizer 
开发者ID:thiagoralves,项目名称:OpenPLC_Editor,代码行数:35,代码来源:ConfTreeNodeEditor.py


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