[gtkmm] Gtk::CTree and pixmaps
- From: Thomas Adams <thomas adams onlinehome de>
- To: gtkmm-list gnome org
- Subject: [gtkmm] Gtk::CTree and pixmaps
- Date: Sat, 21 Sep 2002 12:49:43 +0200
Hello list,
I'm a newbie to gtk+ and gtkmm. I want to display
pixmaps within a CTree object instead of plus and minus.
I have tried following code, but this does not work, and I
cannot figured out why:
CTree *m_tree=new CTree(titles,0);
//creating pixmap from file
pixmapSelectedNode=manage(new class Gtk::Pixmap( folder_t_xpm));
pixmapUnselectedNode=manage(new class Gtk::Pixmap(mini_ofolder_xpm));
//getting necessary information
Gdk_Pixmap gdk_selected;
Gdk_Bitmap gdk_selected_mask;
pixmapSelectedNode->get(gdk_selected,gdk_selected_mask);
Gdk_Pixmap gdk_unselected;
Gdk_Bitmap gdk_unselected_mask;
pixmapUnselectedNode->get(gdk_unselected,gdk_unselected_mask);
//setting und Node-Element of CTree
vector<string> item;
item.push_back("column0");
item.push_back("column1");
//adding it to CTree
m_tree->rows().push_back(Element(item,gdk_unselected,gdk_unselected_mask,gdk_selected,gdk_unselected_mask));
Compiling works without errors, but the pixmaps aren't displayed
at runtime, only the plus and minus is been displayed
Does anybody has an idea, or can provide me with short example?
Thanks in advance
Thomas Adams
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]