tags:

views:

64

answers:

1

I'm trying to set the focus from one widget to the next one using the focusNextChild() method. It works, but I there seems to be a slight difference between using the tab-key or doing things in code. If the next control is a button, using the tab-key results in a focused button with its caption surrounded with little dots, so you see immediately which control has the focus. Using code no dots are visible. How can I force the dots to appear?

+1  A: 

This problem (that the focus rectangle is not drawn except when using explicit keyboard focussing; e.g. using the tab-key) could be a result of how the chosen theme (and window manager?) chooses to render the given element.

Some themes may choose to draw focus rectangles around 'any' element which receives focus, while others will only draw focus rectangles when explicitely using 'keyboard' navigation.

In short: this is probably a theme-specific issue.

ChristopheD