當前位置: 首頁>>代碼示例>>Python>>正文


Python wx.BG_STYLE_CUSTOM屬性代碼示例

本文整理匯總了Python中wx.BG_STYLE_CUSTOM屬性的典型用法代碼示例。如果您正苦於以下問題:Python wx.BG_STYLE_CUSTOM屬性的具體用法?Python wx.BG_STYLE_CUSTOM怎麽用?Python wx.BG_STYLE_CUSTOM使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在wx的用法示例。


在下文中一共展示了wx.BG_STYLE_CUSTOM屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: create_widget

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import BG_STYLE_CUSTOM [as 別名]
def create_widget(self):
        if self.overlapped and self.parent._IS_GRIDBAG: return
        style = wx.FULL_REPAINT_ON_RESIZE
        if self.parent.CHILDREN in (-1, 1):  # e.g. Panel in a Frame
            size = self.parent.widget.GetClientSize()
        else:
            size = (20, 20)
        self.widget = wx.Window(self.parent_window.widget, -1, size=size, style=style)
        self.widget.SetBackgroundStyle(wx.BG_STYLE_CUSTOM)
        #self.widget.SetAutoLayout(True)
        self.widget.Bind(wx.EVT_PAINT, self.on_paint)
        self.widget.Bind(wx.EVT_ERASE_BACKGROUND, self.on_erase_background)
        self.widget.Bind(wx.EVT_RIGHT_DOWN, self.popup_menu)
        self.widget.Bind(wx.EVT_LEFT_DOWN, self.on_drop_widget)
        self.widget.Bind(wx.EVT_MIDDLE_DOWN, misc.exec_after(self.on_select_and_paste))
        self.widget.Bind(wx.EVT_ENTER_WINDOW, self.on_enter)
        self.widget.Bind(wx.EVT_LEAVE_WINDOW, self.on_leave)
        #self.widget.Bind(wx.EVT_CHAR_HOOK, misc.on_key_down_event)  # catch cursor keys   XXX still required? 
開發者ID:wxGlade,項目名稱:wxGlade,代碼行數:20,代碼來源:edit_base.py

示例2: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import BG_STYLE_CUSTOM [as 別名]
def __init__(self, parent, tip, restricted=True):
        """
        Constructor
        @param parent: Parent window
        @param tip: Tip text (may be multiline)
        @param restricted: Tool tip must follow size restriction in line and
            characters number defined (default True)
        """
        wx.PopupWindow.__init__(self, parent)

        self.Restricted = restricted

        self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM)
        self.SetTip(tip)

        # Initialize text font style
        self.Font = wx.Font(
            faces["size"],
            wx.SWISS,
            wx.NORMAL,
            wx.NORMAL,
            faceName=faces["mono"])

        self.Bind(wx.EVT_PAINT, self.OnPaint) 
開發者ID:thiagoralves,項目名稱:OpenPLC_Editor,代碼行數:26,代碼來源:CustomToolTip.py

示例3: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import BG_STYLE_CUSTOM [as 別名]
def __init__(self, parent):
        super(View, self).__init__(parent)
        self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM)
        self.Bind(wx.EVT_SIZE, self.on_size)
        self.Bind(wx.EVT_PAINT, self.on_paint)
        self.Bind(wx.EVT_CHAR_HOOK, self.on_char)
        self.index = -1
        self.weights = {}
        self.model = None
        self.bitmap = None
        wx.CallAfter(self.next) 
開發者ID:fogleman,項目名稱:GraphLayout,代碼行數:13,代碼來源:viewer.py


注:本文中的wx.BG_STYLE_CUSTOM屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。