当前位置: 首页>>代码示例>>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;未经允许,请勿转载。