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


Python wx.SystemSettings_GetColour方法代碼示例

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


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

示例1: draw_sort_arrow

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import SystemSettings_GetColour [as 別名]
def draw_sort_arrow(self, direction):
        b = wx.EmptyBitmap(self.icon_size, self.icon_size)
        w, h = b.GetSize()
        ho = (h - 5) / 2
        dc = wx.MemoryDC()
        dc.SelectObject(b)
        colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_GRAYTEXT)
        dc.SetBackgroundMode(wx.TRANSPARENT)
        dc.Clear()
        dc.SetPen(wx.Pen(colour))
        for i in xrange(5):
            if direction == 'down':
                j = 4 - i
            else:
                j = i
            dc.DrawLine(i,j+ho,9-i,j+ho)
        dc.SelectObject(wx.NullBitmap)
        b.SetMask(wx.Mask(b, (255, 255, 255)))
        return b 
開發者ID:kenorb-contrib,項目名稱:BitTorrent,代碼行數:21,代碼來源:ListCtrl.py

示例2: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import SystemSettings_GetColour [as 別名]
def __init__(self, *args, **kwds):
        # begin wxGlade: Bug184_Frame.__init__
        kwds["style"] = kwds.get("style", 0)
        wx.Frame.__init__(self, *args, **kwds)
        self.SetTitle(_("frame_1"))
        self.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))

        sizer_1 = wx.BoxSizer(wx.VERTICAL)

        self.label_1 = wx.StaticText(self, wx.ID_ANY, _("Just a label"))
        sizer_1.Add(self.label_1, 1, wx.ALL | wx.EXPAND, 5)

        self.SetSizer(sizer_1)
        sizer_1.Fit(self)

        self.Layout()
        # end wxGlade

# end of class Bug184_Frame 
開發者ID:wxGlade,項目名稱:wxGlade,代碼行數:21,代碼來源:bug184.py

示例3: BrushForNode

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import SystemSettings_GetColour [as 別名]
def BrushForNode( self, node, depth=0 ):
        """Create brush to use to display the given node"""
        if node == self.selectedNode:
            color = wx.SystemSettings_GetColour(wx.SYS_COLOUR_HIGHLIGHT)
        elif node == self.highlightedNode:
            color = wx.Colour( red=0, green=255, blue=0 )
        else:
            color = self.adapter.background_color(node, depth)
            if not color:
                red = (depth * 10)%255
                green = 255-((depth * 5)%255)
                blue = (depth * 25)%255
                color = wx.Colour( red, green, blue )
        return wx.Brush( color  ) 
開發者ID:lrq3000,項目名稱:pyFileFixity,代碼行數:16,代碼來源:squaremap.py

示例4: TextForegroundForNode

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import SystemSettings_GetColour [as 別名]
def TextForegroundForNode(self, node, depth=0):
        """Determine the text foreground color to use to display the label of
           the given node"""
        if node == self.selectedNode:
            fg_color = wx.SystemSettings_GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT)
        else:
            fg_color = self.adapter.foreground_color(node, depth)
            if not fg_color:
                fg_color = wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOWTEXT)
        return fg_color 
開發者ID:lrq3000,項目名稱:pyFileFixity,代碼行數:12,代碼來源:squaremap.py

示例5: OnEraseBackground

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import SystemSettings_GetColour [as 別名]
def OnEraseBackground(self, event=None):
        nsp = self.GetScrollPos(wx.VERTICAL)
        if self._last_scrollpos != nsp:
            self._last_scrollpos = nsp
            # should only refresh visible items, hmm
            wx.CallAfter(self.Refresh)
        dc = wx.ClientDC(self)
        # erase the section of the background which is not covered by the
        # items or the selected column highlighting
        dc.SetBackground(wx.Brush(self.GetBackgroundColour()))
        f = self.GetRect()
        r = wx.Region(0, 0, f.width, f.height)
        x = self.GetVisibleViewRect()
        offset = self._get_origin_offset(include_header=True)
        x.Offset(offset)
        r.SubtractRect(x)
        if '__WXMSW__' in wx.PlatformInfo:
            c = self.GetColumnRect(self.enabled_columns.index(self.selected_column))
            r.SubtractRect(c)
        dc.SetClippingRegionAsRegion(r)
        dc.Clear()

        if '__WXMSW__' in wx.PlatformInfo:
            # draw the selected column highlighting under the items
            dc.DestroyClippingRegion()
            r = wx.Region(0, 0, f.width, f.height)
            r.SubtractRect(x)
            dc.SetClippingRegionAsRegion(r)
            dc.SetPen(wx.TRANSPARENT_PEN)
            hc = wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW)
            r = highlight_color(hc.Red())
            g = highlight_color(hc.Green())
            b = highlight_color(hc.Blue())
            hc.Set(r, g, b)
            dc.SetBrush(wx.Brush(hc))
            dc.DrawRectangle(c.x, c.y, c.width, c.height) 
開發者ID:kenorb-contrib,項目名稱:BitTorrent,代碼行數:38,代碼來源:ListCtrl.py

示例6: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import SystemSettings_GetColour [as 別名]
def __init__(self, parent):
        wx.StatusBar.__init__(self, parent, -1)
        self.sizeChanged = False
        self.Bind(wx.EVT_SIZE, self.OnSize)
        self.Bind(wx.EVT_IDLE, self.OnIdle)
        self.SetFieldsCount(2)
        self.SetStatusWidths([-1, 40])
        self.icons = [
            GetInternalBitmap("Tray1"),
            GetInternalBitmap("Tray3"),
            GetInternalBitmap("Tray2"),
        ]
        self.icon = wx.StaticBitmap(self, -1, self.icons[0], (0, 0), (16, 16))
        rect = self.GetFieldRect(0)

        checkBox = wx.CheckBox(self, -1, eg.text.MainFrame.onlyLogAssigned)
        self.checkBox = checkBox
        colour = wx.SystemSettings_GetColour(wx.SYS_COLOUR_MENUBAR)
        checkBox.SetBackgroundColour(colour)
        self.checkBoxColour = checkBox.GetForegroundColour()
        checkBox.SetValue(eg.config.onlyLogAssigned)
        self.SetCheckBoxColour(eg.config.onlyLogAssigned)
        checkBox.Bind(wx.EVT_CHECKBOX, self.OnCheckBox)
        checkBox.SetPosition((rect.x + 2, rect.y + 2))
        checkBox.SetToolTipString(eg.text.MainFrame.onlyLogAssignedToolTip)

        eg.Bind("ProcessingChange", self.OnProcessingChange)
        self.Reposition() 
開發者ID:EventGhost,項目名稱:EventGhost,代碼行數:30,代碼來源:StatusBar.py

示例7: __init__

# 需要導入模塊: import wx [as 別名]
# 或者: from wx import SystemSettings_GetColour [as 別名]
def __init__(self, *args, **kwds):
        # begin wxGlade: wxgMeasurementsByDayPnl.__init__
        kwds["style"] = kwds.get("style", 0) | wx.TAB_TRAVERSAL
        wx.Panel.__init__(self, *args, **kwds)

        __szr_main = wx.BoxSizer(wx.HORIZONTAL)

        self._LCTRL_days = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT)
        self._LCTRL_days.SetMinSize((100, 100))
        __szr_main.Add(self._LCTRL_days, 1, wx.EXPAND | wx.RIGHT, 5)

        self._LCTRL_results = cReportListCtrl(self, wx.ID_ANY, style=wx.BORDER_NONE | wx.LC_REPORT)
        self._LCTRL_results.SetMinSize((100, 100))
        __szr_main.Add(self._LCTRL_results, 1, wx.EXPAND | wx.RIGHT, 5)

        __szr_details = wx.BoxSizer(wx.VERTICAL)
        __szr_main.Add(__szr_details, 1, wx.EXPAND, 0)

        self._TCTRL_measurements = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_AUTO_URL | wx.TE_MULTILINE | wx.TE_READONLY)
        self._TCTRL_measurements.SetMinSize((255, 102))
        self._TCTRL_measurements.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
        __szr_details.Add(self._TCTRL_measurements, 1, wx.EXPAND, 0)

        __szr_show_docs = wx.BoxSizer(wx.HORIZONTAL)
        __szr_details.Add(__szr_show_docs, 0, wx.EXPAND, 0)

        self._LBL_no_of_docs = wx.StaticText(self, wx.ID_ANY, "")
        self._LBL_no_of_docs.SetMinSize((100, 100))
        __szr_show_docs.Add(self._LBL_no_of_docs, 0, wx.ALIGN_CENTER_VERTICAL | wx.RIGHT, 3)

        self._BTN_show_docs = wx.Button(self, wx.ID_ANY, "Show X documents")
        self._BTN_show_docs.SetMinSize((100, 100))
        self._BTN_show_docs.SetToolTip(wx.ToolTip("Show lab related documents for the episode of the selected measurement."))
        self._BTN_show_docs.Enable(False)
        __szr_show_docs.Add(self._BTN_show_docs, 0, wx.ALIGN_CENTER_VERTICAL, 0)

        __szr_show_docs.Add((20, 20), 1, wx.EXPAND, 0)

        self.SetSizer(__szr_main)
        __szr_main.Fit(self)

        self.Layout()

        self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_day_selected, self._LCTRL_days)
        self.Bind(wx.EVT_LIST_ITEM_SELECTED, self._on_result_selected, self._LCTRL_results)
        self.Bind(wx.EVT_BUTTON, self._on_show_docs_button_pressed, self._BTN_show_docs)
        # end wxGlade 
開發者ID:wxGlade,項目名稱:wxGlade,代碼行數:49,代碼來源:toplevels_no_size_Classic.py


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