Using TAB key to move through widgets in dialogs.



Hello!

I want to be able to move through widgets in dialog boxes in my
program by pressing TAB key, just like in Windows, but I don't know
how to do this.  Please, give me some advises.

I think I should play with GTK_CAN_FOCUS, GTK_HAS_FOCUS,
GTK_CAN_DEFAULT, and GTK_HAS_DEFAULT flags of those widgets.
Unfortunately, meaning of *DEFAULT ones isn't fully clear to me.  Will
GtkButton with GTK_HAS_DEFAULT flag set receive "clicked" signal when
user presses Enter key?  If yes, than what does GTK_CAN_DEFAULT flag
means?

I noticed that when I press TAB button, focus moves from one widget to
another, but buttons aren't highlighted when they have it, but border
is drawn around buttons with CAN_DEFAULT flag set.  Is it analogous to
thin border drawn around label of button when it has focus in Windows?

I'm sorry for my rugged English, it isn't my native language.

-- 
                                                             C'ya, Peter.
             --=[petrk pochtamt ru]=--=[ICQ 89449080]=--




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