[wxPython-users] Scrollbar help with DynamicSashWindow
Danny Shevitz
shevitz at lanl.gov
Fri Mar 2 13:13:41 PST 2007
let me see if I understand your response.
Instead of putting the TreeCtrl inside each window created by the DSW,
I should put a panel in each window. If the panel is large enough to hold
the tree, then the panel gets clipped but the
TreeCtrl newer needs to draw it's own scroll bars. At that point I use the
DSW scrollbars to move the panel around.
Is this right?
D
At 12:40 PM 3/2/2007 -0800, you wrote:
>Danny Shevitz wrote:
>>I'm using a DSW to present multiple views of a tree. The DSW has it's own
>>scrollbars.
>>Currently as the length of the tree increases, the TreeCtrl puts up it's
>>own scrollbars, So I have
>>two scrollbars on the rhs.
>>I know DSW's have scrollbar events as in the demo. What I don't
>>understand is how
>>to hook up the DSW scrollbars to the TreeCtrl.
>>For the demo, the operative lines are:
>>self.SetVScrollBar(v_bar)
>>self.SetHScrollBar(h_bar)
>>But there are no Set[V|H]ScrollBar methods for a TreeCtrl. For a TreeCtrl
>>there is
>>a SetScrollbar method, but that just changes the position, not the window.
>>So, I'm stuck. What am I supposed to do?
>
>You could try making the TreeCtrls large enough that they don't need to
>display their scrollbars, and then respond to the scroll events from the
>DSW by moving the tree widgets such that the portion that is visible (not
>clipped by their parent) corresponds to the scrollbar positions. I think
>I would approach it by using a custom panel to hold the treectrl and
>manage sizing it and positioning it. You can then give it
>Set[V|H]ScrollBar methods like STC so it can hook itself up to the DSW's
>scrollbars.
>
>
>--
>Robin Dunn
>Software Craftsman
>http://wxPython.org Java give you jitters? Relax with wxPython!
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
>For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
More information about the wxpython-users
mailing list