Python wx 模块,NO_FULL_REPAINT_ON_RESIZE 实例源码

我们从Python开源项目中,提取了以下2个代码示例,用于说明如何使用wx.NO_FULL_REPAINT_ON_RESIZE

项目:nodemcu-pyflasher    作者:marcelstoer    | 项目源码 | 文件源码
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)
项目:cebl    作者:idfah    | 项目源码 | 文件源码
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)