Re: updating a displayed widget
| From: | Keith Geffert | Date: | Fri, 09 Mar 2001 16:33:57 +0000 |
| Subject: | Re: updating a displayed widget | ||
| References: | 1 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-628@lists.php.net to get a copy of this message | ||
Hi all,
Fixed my update problem. Some people like me should just be drug out
and SHOT.
Here's the Original code I was working with.
And yes this does add it to the list! But after searching the gtk apps
devel mailing list the light clicked.
$new_item[] = &new GtkListItem('A new Item');
$list->append_items( $new_item );
This is pretty bad form as I need control of the item itself. I need to
have a handle to ->show() the GtkListItem after attaching it to the
GtkList widget. DOH!
Working code:
$item = &new GtkListItem( (String) time() );
$list->append_items( array($item) );
$item->show();
And what do you know, I now have working button :P
Thanks for the help!
Keith
On 07 Mar 2001 21:27:21 -0800, Frank M. Kromann wrote:
> Hi Keith,
>
> try ->freeze() before updating and ->thaw() after updating.
>
> - Frank
>
> > Hello all,
> >
> > I'm brand new to gtk. I've been playing with the samples and such, and
> > have a small project to help me learn the process. What I can't figure
> > out is the pragma for updating a displayed widget. I've modified the
> > list.php for my own purposes. After displaying the widget I've added an
> > extra button that adds to the $list (GtkList) widget. This doesn't
> > update the display.
> >
> > I've tried, hiding and then showing. removing and then repacking. I've
> > been skimming the api and tutorial doc's on gtk.org but can't seem to
> > find anything about it.
> >
> > $new_item[] = &new GtkListItem('A new Item');
> > $list->append_items( $new_item );
> >
> > That would seem to get the item into the list widget, but the displayed
> > widget doesn't change.
> >
> > Keith
> >
> >
> >
> > --
> > PHP GTK Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-gtk-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-gtk-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
> >
> >
>
>
>
>
> --
> PHP GTK Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-gtk-unsubscribe@lists.php.net
> For additional commands, e-mail: php-gtk-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net