[wxpython-users] Re: Splitter window and TreeCtrl issues (0/1)
Gertjan Klein
gklein at xs4all.nl
Fri May 2 22:35:29 PDT 2008
Robin Dunn wrote:
>Gertjan Klein wrote:
>
>> If I want the XRC-handling code to deal with everyting GUI-related, I am
>> now forced to choose between two evils:
>>
>> - I get a 50 pixel wide left pane on startup
>> - The user can (accidently or otherwise) resize either panel to zero
>> width, not being able to get it back.
>
>I also used XRC in my test...
OK, apparently we're not seeing the same things then. To recap: in the
example I sent (xrc+py), two splitterwindows are present; first a
vertical one, and in it's top pane a horizontal one. The horizontal one
has (in xrc) sashpos set to 0 (meaning split in the middle), and minsize
set to 50 (I don't want the panes any smaller than that). I've attached
the sample again (this time, hopefully, in the same message :S).
When I launch the sample, the left pane of the horizontal splitter is
very small, perhaps 50px. If I take out the minimum pane size setting
and start the app, the sash is in the middle, where I want it and
requested it to be. However, now the panes can be resized to 0 (which is
what I described above).
You gave two explanations for this. The first one was that the minsize
setting overruled the sashpos setting. This would explain what I
described above, but sounds like a bug to me (sashpos 0 does not mean
panesize 0). The second explanation is an initialization order problem,
where the sash is placed before the final size of the splitter is
determined. This sounds less like a bug to me, but does not explain (to
me, anyway) why removing the minsize setting fixes the problem.
While I am increasingly happy that I've found a simple workaround
(setting sashpos from code), I am curious what makes us see different
things here. Can you not reproduce what I am seeing using the attached
sample?
Regards,
Gertjan.
(Using Python 2.5.1 on Windows XP, wxPython version 2.8.7.1.)
--
Gertjan Klein <gklein at xs4all.nl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exporter.py
Type: application/octet-stream
Size: 1384 bytes
Desc: not available
Url : http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20080503/0b0452af/exporter-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ui.xrc
Type: application/octet-stream
Size: 3896 bytes
Desc: not available
Url : http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20080503/0b0452af/ui-0001.obj
More information about the wxpython-users
mailing list