set_pixtext()

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

set_pixtext()

Der Starchaser


The following old piece of code should be adapted to PHP-GTK 2 :

                $this->clistProjects = new GtkCList(1, array($this->ListTitle));
                $node = $this->clistProjects->append(array($Config));
                $this->clistProjects->set_pixtext($node, 0, $Config, 5,
                                        $this->iconpixmap, $this->iconmask);


I found no method which supports the functionality of the old set_pixtext() in
PHP-GTK 2.

Does anybody know a workaround ?

Thank you

--
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply | Threaded
Open this post in threaded view
|

Re: set_pixtext()

Chris Morgan-10
Are you wanting a GdkPixbuf in a GtkTreeView?  (Sorry, I'm not familiar with
PHP-GTK1 code)

On Thu, Aug 27, 2009 at 6:46 PM, Der Starchaser <[hidden email]>wrote:

>
>
> The following old piece of code should be adapted to PHP-GTK 2 :
>
>                $this->clistProjects = new GtkCList(1,
> array($this->ListTitle));
>                $node = $this->clistProjects->append(array($Config));
>                $this->clistProjects->set_pixtext($node, 0, $Config, 5,
>                                        $this->iconpixmap, $this->iconmask);
>
>
> I found no method which supports the functionality of the old set_pixtext()
> in
> PHP-GTK 2.
>
> Does anybody know a workaround ?
>
> Thank you
>
> --
> PHP-GTK General Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- Chris Morgan <[hidden email]>


I'm good at making two things: mistakes and enemies.
Reply | Threaded
Open this post in threaded view
|

Re: set_pixtext()

Madeleine D.-3
In reply to this post by Der Starchaser


CList should be replaced with GtkTreeView.  Attach a
GtkCellRendererPixbuf to a given column in the view and use
'set_cell_data_func' to format the cell_renderer.  At the callback for
that, you can then isolate a given cell/row and use
'set_property("pixbuf", $image)' to load the pixmap.

hth,
Madeleine D.


Der Starchaser wrote:

> The following old piece of code should be adapted to PHP-GTK 2 :
>
> $this->clistProjects = new GtkCList(1, array($this->ListTitle));
>                 $node = $this->clistProjects->append(array($Config));
>                 $this->clistProjects->set_pixtext($node, 0, $Config, 5,
> $this->iconpixmap, $this->iconmask);
>
>
> I found no method which supports the functionality of the old set_pixtext() in
> PHP-GTK 2.
>
> Does anybody know a workaround ?
>
> Thank you
>
>  

--
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php