colorpanel.py

来自「用wxPython编写GUI程序的样例代码」· Python 代码 · 共 21 行

PY
21
字号
#
# Note: this module is not a demo per se, but is used by many of 
# the demo modules for various purposes.
#

import wx

#---------------------------------------------------------------------------


class ColoredPanel(wx.Window):
    def __init__(self, parent, color):
        wx.Window.__init__(self, parent, -1, style = wx.SIMPLE_BORDER)
        self.SetBackgroundColour(color)
        if wx.Platform == '__WXGTK__':
            self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM)


#---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?