G
Guest
I'm trying to use the OpenNETCF DateTimePicker in NETCF 1, but it appears
that the underlying SysDateTimePick32 control is doing some strange stuff
with the focus.
When the SysDateTimePick32 has focus, and you press the left/right hardware
buttons, focus moves between the M/D/Y fields. Up/down adjust the field
values. The control won't relinquish the focus.
This differs from the behavior of SysDateTimePick32 in the PoomManager SDK
sample, which is C++/Win32 code. In that sample, when focus in on the
first/last field, the left/right buttons gives focus to the previous/next
control. PoomManager doesn't appear to do anything special.
I realize that in OpenNETCF the SysDateTimePick32 control is a child of a
message window, so I tried creating a couple of sibling Edit controls. I used
spy to make sure they were before/after SysDateTimePick32 in the z-order and
all the style bits were identical to the PoomManager controls, but
SysDateTimePick32 continues to hog the focus.
As an experiment, I also tried calling Win32Window.SetParent to make the
SysDateTimePick32 control a child of my NETCF form. It still behaved the same
way.
My app runs on SmartPhone devices as well as PocketPC, so this behavior
makes the DateTimePicker unusable. Any clues would be greatly appreciated.
that the underlying SysDateTimePick32 control is doing some strange stuff
with the focus.
When the SysDateTimePick32 has focus, and you press the left/right hardware
buttons, focus moves between the M/D/Y fields. Up/down adjust the field
values. The control won't relinquish the focus.
This differs from the behavior of SysDateTimePick32 in the PoomManager SDK
sample, which is C++/Win32 code. In that sample, when focus in on the
first/last field, the left/right buttons gives focus to the previous/next
control. PoomManager doesn't appear to do anything special.
I realize that in OpenNETCF the SysDateTimePick32 control is a child of a
message window, so I tried creating a couple of sibling Edit controls. I used
spy to make sure they were before/after SysDateTimePick32 in the z-order and
all the style bits were identical to the PoomManager controls, but
SysDateTimePick32 continues to hog the focus.
As an experiment, I also tried calling Win32Window.SetParent to make the
SysDateTimePick32 control a child of my NETCF form. It still behaved the same
way.
My app runs on SmartPhone devices as well as PocketPC, so this behavior
makes the DateTimePicker unusable. Any clues would be greatly appreciated.