[wxPython-users] FlexGridSizer not resizing custom control
Robin Dunn
robin at alldunn.com
Thu Dec 7 15:50:54 PST 2006
Tom Plunket wrote:
> Jeffrey Barish wrote:
>
>> I am trying to create a custom control that simply draws a stretchable
>> horizontal line. When I put the control in a horizontal BoxSizer, the line
>> stretches when the window resizes to fill the space available, as it
>> should. When I put the control in a growable column of a FlexGridSizer,
>> the line does not stretch.
>
> I took out the OnSize handling, which is incorrect anyway, and it seemed
> to work fine. WinXP, Py2.4.3, wx2.6.3.3-msw-unicode. Maybe there was
> something going on with using a PaintDC outside of the paint message
> handling?
Yeah, I forgot to mention that should be either removed, or replaced
with a Refresh to trigger a EVT_PAINT. wx.PaintDC can only be used in a
EVT_PAINT handler.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list