On Tue, 26 Sep 2000, Deborah Swayne wrote:
Hi,
> How do I get the dimensions of the viewing area of
> a scrolled window? By that I mean the size of the
> area that's currently visible, not the total possible
> size. The scrolled_window holds an event box, which
> holds a table.
>
> Is this what I need? It doesn't seem to work the
> way I thought it should, but I'm not sure.
>
> GTK_BIN (scrolled_window)->child->allocation.height,
> GTK_BIN (scrolled_window)->child->allocation.width
This is right solution :
GtkAdjustment *adj;
adj = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(scrolled_window));
width = adj->page_size;
adj = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(scrolled_window));
height = adj->page_size;
Best regards,
Stevo.
--
Stefan Ondrejicka <[EMAIL PROTECTED]>
Beethovenova 11, 917 08 Trnava, Slovakia
http://www.idata.sk/~ondrej/
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list