Re: more on scrolled window sizing ... fixes + bugs?



>> Alternatively, should I just be using a viewport (or two) and creating
>> my own scrollbars to move the visible part of the child around?
>
>It isn't rocket science to create your own scrollbars, if you need
>to. ScrolledWindow is just a convenience thing.

in case anyone cares ...

actually, it turns out to be quite a bit more complex than i would
have thought :) simply calling viewport_set_{h,v}_adjustment() doesn't
work, for example. if you check the code in scrolled_window that
connects its scrollbars to the scrollable child, its a bit more
involved than that. but anyway, i got it to work by ensuring that the
widgets packed into the scrolled windows were layouts (and so didn't
expand their requisition when their children grew), and then telling
the scrolled windows to never use scrollbars. i then created my own
scrollbar to control both scrolled windows at the same time, and
amazingly, scrolled_window_set_vadjustment() *did* work. it was still
necessary to only set one of the windows this way: if you set both,
you get the endless configure event cycle that i mentioned
before. right now, i just set the adjustment of one scrolled window
when the other one changes, rather than driving them both from the
same adjustment.

case closed.

--p



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]