"""
sashPosition
The initial position of the sash. If this value is positive, it specifies
the size of the upper pane. If it is negative, it is absolute value gives
the size of the lower pane. Finally, specify 0 (default) to choose the
default position (half of the total window height).
"""
Negative values don't seem to work. This is probably due to the fact that I
am splitting before the parent window is sized (so the sash position is
calculated relative to a size of 0 during initialization, and ends up
negative). This would work fine if setting a negative sash position would
cause the sash to be anchored to the right or bottom (IMO this would be the
most logical and desirable behavior).
Alternatively, it would be nice to have an explicit flag to set anchoring to
the bottom/right (that way legacy code doesn't change). When the parent
gets resized, the sash would move to maintain constant distance from the
bottom or right side.
Or, to get really fancy, use proportional sash anchoring
0.0 = anchor left (top)
0.5 = proportional sash resize
1.0 = anchor right (bottom)
Negative values don't seem to work. This is probably due to the fact that
I
am splitting before the parent window is sized (so the sash position is
calculated relative to a size of 0 during initialization, and ends up
negative).
Yep, if the splitter has a smaller size than where you are telling it to put
the sash then it tries to correct it for you.
This would work fine if setting a negative sash position would
cause the sash to be anchored to the right or bottom (IMO this would be
the
most logical and desirable behavior).
Alternatively, it would be nice to have an explicit flag to set anchoring
to
the bottom/right (that way legacy code doesn't change). When the parent
gets resized, the sash would move to maintain constant distance from the
bottom or right side.
Or, to get really fancy, use proportional sash anchoring
0.0 = anchor left (top)
0.5 = proportional sash resize
1.0 = anchor right (bottom)
Enter it as a feature request at
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!