Author Topic: [wxSmith][error] refreshing background color in windows  (Read 4228 times)

Offline claudio

  • Single posting newcomer
  • *
  • Posts: 4
[wxSmith][error] refreshing background color in windows
« on: October 30, 2009, 08:51:39 pm »
I am using:

CodeBlocks 8.02 with MingW32 bundled
wxWidgets 2.8
wxSmith

I've created a sample project for wxWidgets 2.8 and using wxSmith I've created a black form with a colored panel (called Panel1) and a button (Button1) for changing the panel color.
The panel doesn't change the color at all, it only changes when I hide the panel...it seems a problem in refreshing the window.

I made a video to explain it, please download it:)
http://www.tequilasmind.com/cast.avi

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5325
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: [wxSmith][error] refreshing background color in windows
« Reply #1 on: October 31, 2009, 01:25:39 am »
You video is too large, > 12M, I need 40min to download,  :(.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline blueshake

  • Regular
  • ***
  • Posts: 459
Re: [wxSmith][error] refreshing background color in windows
« Reply #2 on: October 31, 2009, 05:34:22 am »
You video is too large, > 12M, I need 40min to download,  :(.
I downloaded in 7 minutes . :wink:
Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?

Offline blueshake

  • Regular
  • ***
  • Posts: 459
Re: [wxSmith][error] refreshing background color in windows
« Reply #3 on: October 31, 2009, 06:01:11 am »
Actually this problem is nothing to do with codeblock.
you need to add these codes:
Code
Panel1->Refresh();
:lol:
Keep low and hear the sadness of little dog.
I fall in love with a girl,but I don't dare to tell her.What should I do?

Offline claudio

  • Single posting newcomer
  • *
  • Posts: 4
Re: [wxSmith][error] refreshing background color in windows
« Reply #4 on: October 31, 2009, 11:42:43 am »
awesome!

Thanks :))