[gtkada] Viewport problems
daniel holmstrom
s99d at student.informatik.gu.se
Mon Dec 3 13:08:46 CET 2001
Hi.
I'm trying to use a Scrolled_Widows vertical Adjustment to scroll a
widget in a viewport simultaneously as the widget in the
Scrolled_Window. Both widgets has the same height. If the widget in the
viewport is "W1" and the one in the Scrolled_Window is "W2" this is what
I've tried to do something like this:
declare
Hadj : Gtk_Adjustment;
Vadj : Gtk_Adjustment;
begin
Gtk_New (Scrolled_Win);
Add_With_Viewport (Srolled_Win, W2);
Hadj := Get_Hadjustment (Scrolled_Win);
Vadj := Get_Vadjustment (Scrolled_Win);
Gtk_New (Viewport, Null, Vadj);
-- Don't know if this is the right order for Vadj/Hadj
Add (Viewport, W1);
-- then I put them beside each other in a table and shows them,
-- Both with Xoptions := Yoptions := Expand + Fill;
end;
But the viewport is always the same size as the widget in it, There's
probably something I'm missing here, but I've tried to read the source(c)
for gtk-scrolled-window without any success.
Could someone help me with this, please.
TIA
--
daniel,
<s99d at student.informatik.gu.se>
More information about the gtkada
mailing list