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
DatePicker focus-fixes
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
Logged In: YES
user_id=194457
Cool, thanks!