Author Topic: wxSmith and wxFULL_REPAINT_ON_RESIZE  (Read 4152 times)

Offline PaulS

  • Multiple posting newcomer
  • *
  • Posts: 25
wxSmith and wxFULL_REPAINT_ON_RESIZE
« on: June 29, 2007, 09:33:56 pm »
First let me thank all the Code:Blocks developers for an excellent tool.  I have been using it for a few months and am gradually moving my stuff from Borland.

I have a program with a graph on a wxPanel that needs to be completely repainted when resized.  Adding wxFULL_REPAINT_ON_RESIZE to the wxPanel constructor manually accomplishes this but is lost whenever wxSmith regenerates its code.  This is apparently one of the style attributes that can only be set in the constructor because adding a call to SetWndowStyle immediately after the constructor doesn't work.

Please add wxFULL_REPAINT_ON_RESIZE to the supported style attributes.

I am running the June 28 nightly on Windows XP.  From the wxWidgets docs I gather that this is only a windows and GTK+ problem.  The other platforms always repaint the entire window.

Thanks,
Paul

Offline raph

  • Almost regular
  • **
  • Posts: 242
Re: wxSmith and wxFULL_REPAINT_ON_RESIZE
« Reply #1 on: June 29, 2007, 09:46:40 pm »
If you add your code in the constructor outside of
Code
//(*Initialize(BlaBla)
...
//*)
it shouldn't get deleted.
Or you could also add the call to SetWindowStyle in the "Extra code" property of the panel.
That goes for all "features" which aren't implemented, yet.

Regards
raph

Offline PaulS

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: wxSmith and wxFULL_REPAINT_ON_RESIZE
« Reply #2 on: June 29, 2007, 10:51:16 pm »
Raph:

I am generating the SetWindowsStyle call using using the Extra code property.  The call is generated (and not deleted) but has no effect.  I believe that this particular style is ignored unless specified in the constructor itself. 

I can try removing the panel from wxSmith entirely and newing it myself after the generated code.  I see no reason that wouldn't work.  Still, if wxSmith handled the property it would be cleaner.

Paul

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: wxSmith and wxFULL_REPAINT_ON_RESIZE
« Reply #3 on: June 29, 2007, 11:03:03 pm »
Please add wxFULL_REPAINT_ON_RESIZE to the supported style attributes.

Ok, should be no problem, I'll also add other default styles so the list will be full :)
Thanks for notifying :)


BYO

Offline PaulS

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: wxSmith and wxFULL_REPAINT_ON_RESIZE
« Reply #4 on: June 30, 2007, 07:06:25 pm »
byo:

Thank you.  I was going to wait until I tried it before replying but it looks like Berlios is causing problems again. 

I will only come back in the unlikely case that I have a problem.

Paul