Re: ListStore problem



Nietykalny wrote:

I can't help you anymore with this problem. Try recompiling the whole project or check pCellRendererText if it is a null-pointer or something
weird.

Good luck,
Simon

You were right Simon pointer was null, thats program crashed. I've looked to gtkkmm online book and rewrite code in another way:
  pCellRendererText=new Gtk::CellRendererText();
  pCellRendererText->property_editable()=true;
  pCellRendererText->signal_edited().connect(sigc::mem_fun(*this,&GUI::click));
  Gtk::TreeViewColumn *pColumn=new Gtk::TreeViewColumn("Nick", itsColumnModel.nick);
  pColumn->set_renderer(*pCellRendererText, itsColumnModel.nick);
  itsView.append_column(*pColumn);

The column is displayed as I want, signal works fine but cells in this column aren't editable. I tried to do this but it doesn't work.

----------------------------------------------------------------------
Poznaj Stefana! Zmien komunikator! >>> http://link.interia.pl/f1924

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Try it this way Nietykalny:

   itsView.append_column_editable("Nick", itsColumnModel.nick);
((Gtk::CellRendererText *)itsView.get_column_cell_renderer(0))->property_editable() = TRUE; ((Gtk::CellRendererText *)itsView.get_column_cell_renderer(0))->signal_edited().connect(sigc::mem_fun(*this, &GUI::click));

In the second and third line, I make the assumption that the column "Nick" is the first one append to your Gtk::ListStore "itsView". If this is not the case, you should substitute the appropriate zero based index for that column where the zero character in those lines. The foregoing code works very well for me.

Bob Caryl
begin:vcard
fn:Robert Caryl
n:Caryl;Robert
org:Fiscal Systems, Inc.
adr:;;102 Commerce Circle;Madison;AL;35758;USA
email;internet:bob fis-cal com
title:Senior Software Design Engineer
tel;work:356-772-8920 X108
x-mozilla-html:TRUE
url:http://www.fis-cal.com
version:2.1
end:vcard



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