Re: Treeview with editable checkboxes besides items?



Is this a question?

On Wed, 2007-06-20 at 01:11 +0800, smso graduate hku hk wrote:
> Sorry, I'm wrong about point (1) :(
> 
> I've actually put 3 different types of renderers in the same column.
> I'm attaching more of my codes for your reference:
> 
> (header file)
> 
> 	Gtk::CellRendererToggle renderer_selected;
> 	Gtk::CellRendererPixbuf renderer_type_pixbuf;
> 	Gtk::CellRendererText renderer_1;
> 	Gtk::TreeViewColumn col_1;
> 
> (source file)
> 
> 	folder_type_pixbuf
> 	= Gdk::Pixbuf::create_from_file("folder.png")->scale_simple(16, 16,
> Gdk::INTERP_HYPER);
> 	
> 	file_type_pixbuf
> 	= Gdk::Pixbuf::create_from_file("file.png")->scale_simple(16, 16,
> Gdk::INTERP_HYPER);
> 	
> 	folder_pixbuf = Gdk::Pixbuf::create_from_file("folder.xpm");
> 	folder_open_pixbuf = Gdk::Pixbuf::create_from_file("folder-open.xpm");
> 	file_pixbuf = Gdk::Pixbuf::create_from_file("file.xpm");
> 	
> 	col_1.set_title("Name");
> 	col_1.pack_start(renderer_selected, true);
> 	col_1.add_attribute(renderer_selected, "active", SELECTED_COL);
> 	
> 	col_1.pack_start(renderer_type_pixbuf, true);
> 	col_1.add_attribute(renderer_type_pixbuf, "pixbuf", TYPE_PIXBUF_COL);
> 	col_1.add_attribute(renderer_type_pixbuf, "pixbuf_expander_closed",
> TYPE_CLOSED_PIXBUF_COL);
> 	col_1.add_attribute(renderer_type_pixbuf, "pixbuf_expander_open",
> TYPE_OPEN_PIXBUF_COL);
> 	
> 	col_1.pack_start(renderer_1, true);
> 	col_1.add_attribute(renderer_1, "text", NAME_COL);

-- 
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]