Menu

#1 Fix Focus handling

open
nobody
None
5
2005-04-21
2005-04-21
No

There are two issues with the current implementation:

1) The DatePicker does not overwrite setFocus() and
therefore, a "random" (at least not determined) child of it will
get the focus. On my system, it is the '<<' button, usually.

This inhibits keyboard navigation for example.

Fix: overwrite setFocus() and by default give it to the panel.

2) The DatePickerCombo compares the application's
Focus-Control with specific widgets. In case of composite
widgets, (e.g. the DatePicker), the focus-control is usually not
the DatePicker itself, but one of its focusable child-widgets. So
the comparison with e.g. 'dp' fails, because the DatePicker's
panel is the focus control.

Fix: ask the dp whether it has the focus, which includes asking
its children.

(A minor 3rd issue is that a non-editable text-widget should not
get the focus -- in that case, the arrow-button should get it).

Thanks,
Carsten Pfeiffer

Discussion

  • Carsten Pfeiffer

    DatePicker focus-fixes

     
  • Seb

    Seb - 2005-08-15

    Logged In: YES
    user_id=341856

    Hi Carsten,

    thanks for the patch. I added it in the date picker. Via CVS
    you can now grab a new version of the date picker that also
    has some other things fixed.

    Seb

     
  • Carsten Pfeiffer

    Logged In: YES
    user_id=194457

    Cool, thanks!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.