[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-swt-dev] Focus problem with new widget... I think
|
I'm trying to make a new widget that wraps the win32 DateTimePicker
control. Everything is working great except for 1 problem that I can't
seem to trace down, mainly due to my limited knowledge of the inner
workings of SWT.
The DateTimePicker Control has a popup window to allow the user to pick
the date. This is presented via a drop down arrow button similar to a
combo box. When the popup is activated by a left mouse click and then a
date is picked with a left mouse click, the popup is closed
automatically and the new date is put in the edit field. However the
app is in a funny state focus wise I believe( could be wrong here ).
The app no longer responds to mouse movements as far as hot tracking,
button pushing, list selection, and such. I have to left click anywhere
in the app to restore normal behavior. I'm not sure why this is
happening. It seems to stem from the fact that I clicked outside of the
bounds of the original date picker edit area in choosing the date. If I
drop down the picker with the keyboard shortcut and then pick the date
with the mouse this behavior does not happen. It only happens if I
click the drop down arrow with the mouse.
The class I'm creating extends Control and only overrides a minimal set
of super functions(callWindowProc, checkStyle, widgetStyle, windowClass,
windowProc).
Things I have tried.
I noticed Combo overrides WM_SETFOCUS and WM_KILLFOCUS because it
receives similar notifications in the WM_COMMAND messages. DatePicker
receives the same kind of messages in the WM_NOTIFY message so I tried
processing it the same as Combo to no avail.
I modified hasFocus() to take into account when the popup was visible.
I'm not sure what else to try, this could not even be a focus problem
:).
Rob Hughes