Re: [gtkmm] changing key bindings (table navigation)



>How can one change the key behaviors within widget, ie. changing what the keys
> do?
>
>For example: 
>
>I have a table layout containing entry widgets. When the table has the focus
>left/right movement is with shift-tab/tab and up/down with up-arrow/down-arrow
>.
>During this movement the default text of each entry widget is highlighted when
> it has
>the focus. The left/right arrow will then move the cursor within the entry wid
>get.
>
>What I want is for navigation within the table to be all with the arrows. The 
>reason
>for this is navigation between various containers on screen (~4 of them) is wi
>th 
>the tab key, and I don't want the user to have to tab through some 96 widgets 
>in the
>table layout in order to tab out of the table and get to the next section of t
>he 
>screen. 

how do you propose to move the cursor within an entry or similar
widget?

the current code in GTK+ attempts to do "the best" thing, by using
arrows to navigate between focusable widgets except when the current
focus widget was felt to require internal navigation with arrow keys. 

you can override this in a key_release event handler, but its
moderately complicated, and will cause problems if any of the widgets
are entries and the user wants to navigate within them.



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