Re: Gtk::TreeView with Gtk::CellRendererPixbuf



mpGtkTreeView->set_model(mRefGtkListStore);

did help a bit, as did the changes you mentioned below. thanks bob mate.

gaz

On Mon, 2006-08-21 at 06:28 -0500, Bob Caryl wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I was looking at your code a bit more:
> 
> class GamePervAppModelColumns:public Gtk::TreeModelColumnRecord
> {
> public:
>    GamePervAppModelColumns(){ add(mIcon); add(mszName); }
> 
>    ///////////////////////////////////////////////////////////////
>    // don't do it this way:
>    //Gtk::TreeModelColumn<Glib::RefPtr<Gtk::CellRendererPixbuf>>mIcon;
>    ///////////////////////////////////////////////////////////////
>    Gtk::TreeModelColumn < Glib::RefPtr < Gdk::Pixbuf> > mIcon;
>    Gtk::TreeModelColumn < Glib::ustring > mszName;
> }; // end class GamePervAppModelColumns
> 
> Note the mIcon declaration.  You want to specify *what* you are going to
> display, not with what you would display it.  At least I think that is
> what you want.
> 
> As usual, you guys sing out if I'm wrong here.
> 
> Bob Caryl
> 
> Gareth Foster wrote:
> >> It might help to know what your actual results are so that we know
> >> where to start looking.
> >>
> > 
> > Well, not much, an empty tree view, I'd expect a line of text to be
> > appended as per the line near the end of the constructor there.
> > 
> > The tree view just stays blank, so its hard to know what I might be
> > doing wrong, or what I might be forgetting to do.
> > 
> > Incidentally, I am still having trouble finding an example of a pixbuf
> > in a treeview, I'm told there is one in the gtk-demo folder, but I
> > couldn't find it.
> > 
> > Cheers for any help folks,
> > 
> > Gaz
> > 
> > _______________________________________________
> > gtkmm-list mailing list
> > gtkmm-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gtkmm-list
> > 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
> 
> iD8DBQFE6ZjhuCj6XIbb5UIRAq6XAJwNhVgFwF3Po6DDfjYIYYYEP4urjgCcCHi9
> NQHEK6N2s3ZCnESG62ySZtI=
> =oGbs
> -----END PGP SIGNATURE-----




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]