Re: Gtk::TreeView with Gtk::CellRendererPixbuf
- From: "Jonathon Jongsma" <jonathon jongsma gmail com>
- To: "Gareth Foster" <earthworm planetearthworm com>
- Cc: Murray Cumming <murrayc murrayc com>, gtkmm-list gnome org
- Subject: Re: Gtk::TreeView with Gtk::CellRendererPixbuf
- Date: Sun, 20 Aug 2006 10:32:24 -0500
On 8/20/06, Gareth Foster <earthworm planetearthworm com> wrote:
I still can't make this happen.
Here is what I have so far (I've tried to trim it for relevance). What
am I missing?
http://www.noidea128.org/sourcefiles/16480.html
Gaz
On Fri, 2006-08-18 at 18:52 +0200, Murray Cumming wrote:
> 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.
>
It might help to know what your actual results are so that we know
where to start looking.
--
jonner
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]