On Sat, 2004-12-18 at 21:36 +0100, Lars Luthman wrote: > Does anyone know how to do this? The custom widgets may resize > themselves at any time too. I have a sketch of what I want here: > > http://www.d.kth.se/~d00-llu/dino/figure3.png > > The horizontal scrollbar should control both viewports, and the vertical > should only control the upper viewport (there are no viewports there, I > couldn't insert them in glade). OK, I managed to solve this after looking through the GTK+ source code for GtkScrolledWindow - I simply derived a new class from ScrolledWindow, set its policies to POLICY_NEVER, and wrote a on_size_request() function that sets the requested size to 0, ignoring the size of the child widget (except for the bottom widget, where I use ScrolledWindow::on_size_request() to get the height). Then I set the adjustments of the scrollbars to the adjustments of my derived scrolled windows. -- Lars Luthman PGP key: http://www.d.kth.se/~d00-llu/pgp_key.php Fingerprint: FCA7 C790 19B9 322D EB7A E1B3 4371 4650 04C7 7E2E
Attachment:
signature.asc
Description: This is a digitally signed message part