The text box of the DateGadget appears to be split into separate fields for each component used in the date format, so in this sample code there are 3 fields where I am using the format as mm/dd/yy
Code: Select all
If OpenWindow(0, 0, 0, 120, 50, "DateGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
DateGadget(0, 10, 5, 80, 25, "%mm/%dd/%yy", Date(), #PB_Date_UpDown)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
I want the 2nd field (in this case, the day field) to take focus as the default, or if not the default then force focus onto the 2nd field immediately after executing the program code.
Obviously I could swap the format to be dd/mm/yy but thats not our native format so I much prefer to keep the mm/dd/yy format. If there is any hope of manipulating focus in that text box I expect it would involve a Windows API, which is fine. I hunted through MS resources and found mountains of documentation on the "Date and Time Picker Controls", but as usual highly esoteric and waaay over my head.