set_pixtext()

View: New views
3 Messages — Rating Filter:   Alert me  

set_pixtext()

by Der Starchaser :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



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


Re: set_pixtext()

by Chris Morgan-10 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <TheStarchaser@...>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 <chris.morganiser@...>


I'm good at making two things: mistakes and enemies.

Re: set_pixtext()

by Madeleine D.-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



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