wxPython.Panel刷新/重绘/更新??? [英] wxPython.Panel refresh / redraw / update???
问题描述
大家好!
有点问题...
我程序中的两个面板包含一些复选框。确切的数字由一对变量确定。
我最近实现了一个向导更改该数字的向导,以及程序的保存和加载功能。 />
我知道在内存中被更改的数量(我添加了一个快速检查按钮)但我正在努力的是如何使用新的chek盒刷新面板..非常困惑!
代码时间......
Hello everyone!
Got a bit of a problem...
Two of the panels on my program contain a number of check boxes. The exact number of which is determined by a pair of variables.
I have recently implemented a Wizard which changes that number, as well as a save and load function to the program.
I know the number of being altered in memory (i added a quick check button) but what i''m struggling with is how to refresh the panel with the new number of chek boxes... very confused!
code time...
推荐答案
你有没有ied叫self.Refresh()?
我之前注意到你没有保存父母。我总是分配
self.parent = parent
以防我需要做一些对框架中所有小部件都有效的事情。
或者你可以
parent = self.GetParent()
还有wxUpdate()可供查看。
Have you tried calling self.Refresh()?
I noticed earlier that you don''t save the parent. I always assign
self.parent = parent
just in case I need to do something that acts on all the widgets in a frame.
Or you can
parent = self.GetParent()
There is also wxUpdate() to look at.
你试过调用self.Refresh()吗?
我之前注意到你没有保存父母。我总是分配
self.parent = parent
以防我需要做一些对框架中所有小部件都有效的事情。
或者你可以
parent = self.GetParent()
还有wxUpdate()可供查看。
Have you tried calling self.Refresh()?
I noticed earlier that you don''t save the parent. I always assign
self.parent = parent
just in case I need to do something that acts on all the widgets in a frame.
Or you can
parent = self.GetParent()
There is also wxUpdate() to look at.
i尝试了self.Refresh()但它似乎做不了多少:-s
哪里可以包含自我.parent =父线?而且 - 那到底是做什么的?大声笑
我有一种make-shift解决方案1/2工作,我有一个方法破坏mainFrame中的所有帧然后另一个方法重建它们,但由于某种原因它只会这样做一次。尝试第二次,它似乎无法正确地构建sizer信息并将所有内容放在彼此的顶部。
Mark
i tried self.Refresh() but it didnt seem to do much :-s
where would i include the self.parent = parent line? and also - what exactly would that do? lol
Ive got a sort of make-shift solution 1/2 working where i have a method which destroys all the frames within mainFrame and then another method rebuilds them, but for some reason it will only do this once. Try for a second time and it seems unable to cirrectly build the sizer information and places everything over the top of one another.
Mark
i尝试了self.Refresh()但它似乎没有做太多的事情:-s
哪里可以包含自我。 parent =父线?而且 - 那到底是做什么的?大声笑
我有一种make-shift解决方案1/2工作,我有一个方法破坏mainFrame中的所有帧然后另一个方法重建它们,但由于某种原因它只会这样做一次。尝试第二次,它似乎无法正确构建sizer信息并将所有内容放在彼此的顶部。
Mark
i tried self.Refresh() but it didnt seem to do much :-s
where would i include the self.parent = parent line? and also - what exactly would that do? lol
Ive got a sort of make-shift solution 1/2 working where i have a method which destroys all the frames within mainFrame and then another method rebuilds them, but for some reason it will only do this once. Try for a second time and it seems unable to cirrectly build the sizer information and places everything over the top of one another.
Mark
我在思考
self.parent.Update()
I was thinking along the lines of
self.parent.Update()
这篇关于wxPython.Panel刷新/重绘/更新???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!