Re: treeview Tab control



Hi, Thomas.
Maybe you should try to catch GDK events ? Like this:

// in constructor
signal_key_press_event().connect(sigc::mem_fun(*this,
&MyTreeView::onKeyPressEvent), false);

/// .............
bool MyTreeView::onKeyPressEvent(GdkEventKey* event) {
  if(event->type == GDK_KEY_PRESS) {
    if(event->keyval == GDK_Return) {
      // set active next column
      // ...
      // and stop executing of other handlers
      return true;
    }
  }
  return false;
}

If your gdk event handler returns true, all other handlers won't be
executed. GDK_Return represents "Enter" key, you should replace it
with GDK_Tab (but i'm not sure, look at gtkmm header files).

Galymzhan.

2009/11/2, José Alburquerque <jaalburquerque cox net>:
> On Sat, 2009-10-31 at 09:45 +0100, Thomas Sommer wrote:
>> Hi everyone,
>>
>> does really nobody has even the smallest hint for me?
>> I simply want the tab-key in an editable treeview to behave like the
>> return-key.
>>
>> I would really appreciate it.
>
> The section in the online book on "Editable Cells"[1] may give you ideas
> as to how to go about achieving what you're trying to do.
>
> [1]
> http://library.gnome.org/devel/gtkmm-tutorial/unstable/sec-treeview.html.en#treeview-editable-cells
>
> --
> José
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>


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