[Gtk-sharp-list] Making a cellrendertext editable, how?
George Farris
george@gmsys.com
Fri, 12 Nov 2004 13:55:53 -0800
On Fri, 2004-12-11 at 11:46 -0800, Brad Taylor wrote:
> Hi George,
>
> On Fri, 2004-11-12 at 11:20 -0800, George Farris wrote:
> > How do I make a cell editable in CellRenderText. ILooking at the docs
> > it says it has an "Editable" property but when I try an set it like so:
> >
> > text = new CellRendererText ();
> > text.Editable = ture;
>
> I'm assuming that you mean true and not ture here, but this code should
> work. I have written several applications using Gtk.TreeView and have
> done the same thing before. Can you post your full code here so that we
> can get a better idea of whats going on?
>
> Also, can you post the full error message?
>
> -Brad
This is the code to build the column
column = new TreeViewColumn ();
text = new CellRendererText ();
text.Editable = true;
column.Title = title;
column.SortColumnId = sortid;
column.Sizing = TreeViewColumnSizing.Autosize;
column.PackStart (text, true);
column.AddAttribute (text, "text", col);
tree.AppendColumn(column);
george@ve7frg:~/Projects/gfax $ make
mcs /define:DEBUG /resource:./glade/gfax.glade,gfax.glade /resource:./glade/send-druid.glade,send-druid.glade /resource:./pixmaps/gfax.png,gfax.png /resource:./pixmaps/send.png,send.png -o mono-gfax.exe src/phonebook.cs src/gui.cs src/main.cs src/guitools.cs src/sendphonebook.cs src/fax.cs src/hylafax.cs src/Settings.cs -r gnome-sharp -r gtk-sharp -r glib-sharp -r glade-sharp -r gdk-sharp -r gconf-sharp -r gconf-sharp-peditors.dll
src/guitools.cs(309) error CS0117: `Gtk.CellRenderer' does not contain a
definition for `Editable'
Compilation failed: 1 error(s), 0 warnings
make: *** [mono-gfax.exe] Error 1
--
George Farris
george@gmsys.com