Re: Setting initial position of GtkScrolledWindow?
| From: | Steph | Date: | Fri, 25 Apr 2003 03:39:29 +0000 |
| Subject: | Re: Setting initial position of GtkScrolledWindow? | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-3289@lists.php.net to get a copy of this message | ||
I'm lost again...
http://gtk.php.net/manual/en/gtk.gtkwidget.method.queue_draw.php
doesn't
help any?
----- Original Message -----
From: "Benjamin Smith" <bens@effortlessis.com>
To: <php-gtk-general@lists.php.net>
Sent: Friday, April 25, 2003 2:31 AM
Subject: [PHP-GTK] Setting initial position of GtkScrolledWindow?
> I'm performing a background action that requires the redraw of a
> GtkScrolledWindow containing a BIG list of items, and I'd like it if I
could
> return the newly drawn page to the same scrolling position - except
that I
> can't figure out how to.
>
> Here's what I've been trying: (This is NOT the code I'm using - but
rather a
> conceptual representation of a much larger codebase) Pay closest
attention to
> RedrawScrolledWindow().
>
> How would one do this?
>
> Function DrawScrolledWindow($vbox, $vadj=null)
> {
> // $vbox has a number of GtkToggleButtons packed into a GtkVbox
> $scrolled=&New GtkScrolledWindow(null, $vadj);
> $scrolled->Add_With_Viewport($vbox);
> $scrolled->Show();
> global $win;
> $win->Add($scrolled);
> }
>
> Function RedrawScrolledWindow()
> {
> $vbox=CreateVBox();
> global $win;
> $scrolled=$win->child;
> $vadj=$scrolled->Get_VAdjustment();
> $scrolled->Destroy();
> DrawScrolledWindow($vbox, $vadj);
> }
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>