wxpython滑动面板 wxbuild_wxPython.Panel刷新/重绘/更新???

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...

Expand|Select|Wrap|Line Numbers

解决方案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.

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 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 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 was thinking along the lines of

self.parent.Update()

大家好!

有点问题...

我程序中的两个面板包含一些复选框。确切的数字由一对变量确定。

我最近实现了一个向导更改该数字的向导,以及程序的保存和加载功能。 />

我知道在内存中被更改的数量(我添加了一个快速检查按钮)但我正在努力的是如何使用新的chek盒刷新面板..非常困惑!

代码时间......

展开 | 选择 | Wrap | 行号 < div class ="h2_lin">解决方案

你有没有ied叫self.Refresh()?

我之前注意到你没有保存父母。我总是分配

self.parent = parent

以防我需要做一些对框架中所有小部件都有效的事情。

或者你可以

parent = self.GetParent()

还有wxUpdate()可供查看。

你试过调用self.Refresh()吗?

我之前注意到你没有保存父母。我总是分配

self.parent = parent

以防我需要做一些对框架中所有小部件都有效的事情。

或者你可以

parent = self.GetParent()

还有wxUpdate()可供查看。

i尝试了self.Refresh()但它似乎做不了多少:-s

哪里可以包含自我.parent =父线?而且 - 那到底是做什么的?大声笑

我有一种make-shift解决方案1/2工作,我有一个方法破坏mainFrame中的所有帧然后另一个方法重建它们,但由于某种原因它只会这样做一次。尝试第二次,它似乎无法正确地构建sizer信息并将所有内容放在彼此的顶部。

Mark

i尝试了self.Refresh()但它似乎没有做太多的事情:-s

哪里可以包含自我。 parent =父线?而且 - 那到底是做什么的?大声笑

我有一种make-shift解决方案1/2工作,我有一个方法破坏mainFrame中的所有帧然后另一个方法重建它们,但由于某种原因它只会这样做一次。尝试第二次,它似乎无法正确构建sizer信息并将所有内容放在彼此的顶部。

Mark

我在思考

self.parent.Update()

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值