If I define a date in a DateGadget, I can't edit it afterwards, neither with the keyboard nor with spins. why ?
Code: Select all
OpenWindow(0, 0, 0, 300, 300, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
SetGadgetFont(#PB_Default, FontID( LoadFont(#PB_Any, "Verdana", 10) ) )
DateGadget(0, 10, 10, 195, 25,
"%yyyy/%mm/%dd %hh:%ii",
Date(),
#PB_Date_UpDown | #PB_Date_CheckBox)
DateGadget(2, 10, 100, 195, 25,
"%yyyy/%mm/%dd %hh:%ii",
Date(),
#PB_Date_UpDown | #PB_Date_CheckBox)
; Setting a date to DateGadget #2 and can't edit it after. Why ?
; Mask match and seconds not used
SetGadgetText(2, "2025/01/01 10:00")
; Check box set whatever
; SetGadgetState(2, 1)
Repeat : Until WaitWindowEvent(0) = #PB_Event_CloseWindow
Edit: If I reread the doc, SetGadgetText only does the mask: you then have to set the date using SetGadgetState.
