[wxpython-users] Re: Splitter window and TreeCtrl issues (0/1)

Robin Dunn robin at alldunn.com
Sat May 3 16:28:15 PDT 2008


Gertjan Klein wrote:

> 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.

Actually, I think you've misunderstood the first one, it is just another 
aspect of the second.  In other words, the minsize is not overriding the 
sashpos, it is just preventing the sash from being sized any smaller 
than that due to the tiny size of the splitter before the initial 
layouts are done.


> 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?

I can.  When I tried to duplicate it before I didn't use nested 
splitters and so the built-in code that the splitter window has to 
compensate for this problem was effective.  Your workaround is the 
proper way to deal with this.


-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!



More information about the wxpython-users mailing list