GNOME Bugzilla – Bug 312855
GtkTreeView should NOT have header buttons focusable using Tab key
Last modified: 2005-08-10 14:09:48 UTC
Please describe the problem: In my application I am using GtkTreeView with header visible. When moving widget focus with tab key, GtkTreeView gets focus two times: first it receives focus on tree header, then on the list part of the tree widget. I am not able to prevent this, since there is no public access to the header control. This seems wrong since, looking from the outside, it is one widget only (composite or not) and should receive focus only once in a cycle. Also it degrades my application behaviour, requiring too much Tab key presses to move the focus. In Windows, tree/list view control header is not focusable, and that seems much more natural. My suggestion is: - please make header part NOT focusable - if that is NOT acceptable, then please make an API to enable me to make it optionally NOT focusable Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Yes Other information:
Does gtk_tree_view_set_headers_clickable not do what you want ?
Nope, what I want is that the header can be clickable but not get focus event. Even more interesting, it is possible to set gtk_tree_view_set_headers_clickable to FALSE, but additionaly set gtk_tree_view_column_set_clickable to TRUE and the column will be clickable. What is the point of the gtk_tree_view_set_headers_clickable then ? What I want to say, it is possible to have button not receiving focus with keyboard events but still be clickable (in Windows it is easy, just removing "tab stop" style). Even more, on Windows, this is default behaviour for List view control with headers. To conclude, it seems unnatural for a single control to have two focus points.
I don't think its unnatural at all. The treeview is a complex widget, why should it not have multiple focus locations ? If you would turn that off in your application, it would a) be inconsistent with all other GTK+ apps and b) less usable for people who need to use the keyboard
Real problem is that the focus does not seem to have any sense there. Even if the header button gets focus with Tab key, it does not react to Enter key press or something similar (AFAIK), it reacts only on mouse click. This way one focus position seems compeltely wasted.
1) Space activates the buttons 2) Alt Left/Right reorders them if they're reorderable 3) They can have child widgets