You just call DateTimePicker(x, y, <parent handle>) to use it, it doesn't need a gadgetlist. For use on a panelgadget item, I've included a command in the library, GetItemHandle(gadgetid(#gadget), item) which allows to easily get the window handle of the panel gadget item.
Here's a demo:
Code: Select all
; Main window demo
OpenWindow(0,0,0,500,348,"",$CF0001)
DateTimePicker(20, 20, WindowID(0))
Repeat:Until WaitWindowEvent()=#WM_CLOSE
CloseWindow(0)
MessageRequester("Notice","Press OK to see next demo", $C0)
; Panel demo
OpenWindow(0,0,0,500,348,"",$CF0001)
CreateGadgetList(WindowID(0))
PanelGadget(0,0,00,500,348)
AddGadgetItem(0,0,"Panel 0")
AddGadgetItem(0,1,"Panel 1")
AddGadgetItem(0,2,"Panel 2")
CloseGadgetList()
DateTimePicker(20, 20, GetItemHandle(GadgetID(0),1))
Repeat:Until WaitWindowEvent()=#WM_CLOSE
http://www.networkmaestro.com/DateTimePicker.zip