[wxPython-users] Several cross-platform issues?
Robin Dunn
robin at alldunn.com
Sat Feb 3 21:41:24 PST 2007
Basil Shubin wrote:
> Hi friends,
>
> And again I have encounter with some strange problems. Now it's looks
> like cross-platform issue...
>
> The attached test.py app have *very* strange and unsuspected behavior.
> On my Ubuntu box everything works fine, but on Windows 2000 SP4 there
> following issues:
>
> 1. Frame resizing. self.SetSizeHints() doesn't set the frame size until
> frame was resized by draging it's border (see the screenshot No 1).
SetSizeHints doesn't do SetSize. It just limits what the user can do to
the frame.
>
> 2. There is maximize button on frame title, but it shouldn't be here,
> after all it's not appear on Linux. Should I have manually disable it
> and how?
To remove the maximize button you need to change the frame's style. Try
using wx.DEFAULT_FRAME_STYLE & ~wx.MAXIMIZE_BOX
>
> 3. Following code shows big ugly instead of static line (see shot No 2):
>
> # separate line
> line = wx.StaticLine(self)
> gridSizer.Add(line, (1,0), (1,3), flag=wx.GROW)
The static line control on windows will draw itself with whatever height
you tell it to, not limit itself to a single line like on Linux. Using
the wx.GROW flag with the sizer is spreading the line in both horizontal
and vertical directions. The workaround for this is to but the line in
a box sizer, and put the box sizer in that spot in the grid sizer. Then
you can tell the box sizer to expand the line in just the horizontal
direction.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list