python类NO_FULL_REPAINT_ON_RESIZE的实例源码

Main.py 文件源码 项目:nodemcu-pyflasher 作者: marcelstoer 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __init__(self, parent, title):
        wx.Frame.__init__(self, parent, -1, title, size=(700, 650),
                          style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
        self._config = FlashConfig.load(self._get_config_file_path())

        self._build_status_bar()
        self._set_icons()
        self._build_menu_bar()
        self._init_ui()

        sys.stdout = RedirectText(self.console_ctrl)

        self.SetMinSize((640, 480))
        self.Centre(wx.BOTH)
        self.Show(True)
wxgraphics.py 文件源码 项目:cebl 作者: idfah 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __init__(self, parent, background='black', style=0, *args, **kwargs):
        """Initialize a new DrawablePanel.

        Args:
            parent:         wx parent object.

            style:          Style arguments passed the the wx.Panel base class.
                            The wx.NO_FULL_REPAINT_ON_RESIZE argument is added
                            to the given style arguments.

            args, kwargs:   Additional arguments passed to the wx.Panel
                            base class.
        """
        wx.Panel.__init__(self, parent=parent, style=style | wx.NO_FULL_REPAINT_ON_RESIZE,
                          *args, **kwargs)

        self.background = background

        self.lastSize = (0,0)

        # initial resize creates initial drawing
        # buffer and triggers first draw
        self.resize()

        self.Bind(wx.EVT_PAINT, self.repaint)
        self.Bind(wx.EVT_SIZE, self.resize)


问题


面经


文章

微信
公众号

扫码关注公众号