Re: Question regarding cell editing mode in the Gtk::TreeView



On 9/12/06, Murray Cumming <murrayc murrayc com> wrote:

> Hi all,
>
> I'm trying to make a Gtk::TreeView instance behave in a certain way. I
> have a tree view with text cells (CellRendererText). I turn on the
> "editable" property for the column in question.
>
> Now I can make it go into "edit" mode (the cell suddenly accepts
> input) it seems only by right-clicking with a mouse. However, I don't
> see anything in the documentation that would allow me to
> programmatically "force" the cell to go into editing.

TreeView::set_cursor() should do this. There are three versions of that
method, depending on how precise you want to be:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1TreeView.html#eace1596d745a904c79b6d1b437da778

> What I want to do is use the "Tab" button to circle around a column,
> putting each cell in and out of edit mode as you go. Is there anyway
> to do this?

This should be possible, and I guess someone has achieved it. I might like
the same feature in Glom.

But do remember that this might interfer with the standard keyboard
navigation used for acccessibility.

I use the signal_key_pressed() method to detect the tab key. I have an
example app written which demonstrates this. If you'd like to see it,
I can make it available.


> PS: I found "set_column( Path, Column, bool start_editing), but it
> seems the "start_editing" boolean does not force the cell into edit
> mode.

Do you mean set_cursor()?

Heh. Sorry my bad. I did mean set_cursor().

...and it does not work, sadly. When I specify set_cursor( Path,
Column, true ), it does not force the cell into editing mode, so I
guess I must have just discovered a bug...?


Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com

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



--
R. Douglas Barbieri
doug dooglio net



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