Re: toggle button in TreeView not editable - appended with append_column_editable
- From: Murray Cumming <murrayc murrayc com>
- To: Milosz Derezynski <internalerror gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: toggle button in TreeView not editable - appended with append_column_editable
- Date: Sat, 27 Oct 2007 17:00:27 +0200
On Sat, 2007-10-27 at 16:44 +0200, Milosz Derezynski wrote:
> The togglebutton is just an indicator (going with MVC stuff here);
> that means that you need to set up a callback on:
>
> http://gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1CellRendererToggle.html#0332ce9231ca8d0694f7f1e1b2350bf4
>
> and in that callback, which gives you a string tree path, do whatever
> should be done when it's clicked, and change the state of the
> togglebutton (just negating the state of model_columns.active for that
> row, and using property_active() of the Renderer to reflect the new
> state).
No, append_column_editable() takes care of this, just as it does for
numeric and text columns. You only need to connect signal handlers if
you want to use the regular append_column() methods and have more
control.
It works in the examples/book/treeview/editable_cells/ example, so I
guess we need to see Christopher's simple example of it not working to
investigate more.
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]