Re: Gtk::TreeView with Gtk::CellRendererPixbuf
- From: Murray Cumming <murrayc murrayc com>
- To: Gareth Foster <earthworm planetearthworm com>
- Cc: gtkmm-list gnome org
- Subject: Re: Gtk::TreeView with Gtk::CellRendererPixbuf
- Date: Fri, 18 Aug 2006 18:52:35 +0200
On Fri, 2006-08-18 at 17:36 +0100, Gareth Foster wrote:
> > Just use a Glib::RefPtr<Gdk::Pixbuf> for your model view and everything
> > should work automatically. Yes, it is a Gdk::CellRendererPixbuf that will
> > be created, and that's what to create if you want to set the view column
> > up manually. You should find plenty of examples of this - in the demo's
> > stock items part for instance.
>
> I am still struggling a bit with this. What should the stuff below look
> like?
>
> class GamePervAppModelColumns : public Gtk::TreeModelColumnRecord
> {
> public:
> GamePervAppModelColumns()
> { add(mIcon); add(mszName); }
>
> Gtk::TreeModelColumn<Glib::RefPtr<Gdk::Pixbuf> > mIcon;
> Gtk::TreeModelColumn<Glib::ustring> mszName;
> };// end class GamePervAppModelColumns
GamePervAppModelColumns m_columns;
> Then what about the view part ...
>
> mpGtkTreeView->append_column("Name", *pGdkPixbuf);
mpGtkTreeView->append_column("Name", m_columns.mszName;
> I can't find the "demo's stock items part" you mentioned either. Where
> should I be looking for that?
In demos/gtk-demo/, in the tarball.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]