TimeGadget

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

TimeGadget

Post by PB »

Could netmaestro's code (below) be made a native gadget?

Code: Select all

#DTS_TIMEFORMAT = $9
OpenWindow(0,0,0,320,240,"Somebody Just Shoot Me...",$CF0001)
InitCommonControls_() ; Not needed?
dtp = CreateWindowEx_(0,"SysDateTimePick32","",#WS_CHILD|#WS_VISIBLE|#DTS_TIMEFORMAT,100,100,100,22,WindowID(0),0,GetModuleHandle_(0),0)
Repeat : Until WaitWindowEvent()=#WM_CLOSE
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: TimeGadget

Post by PB »

Actually, as I woke up this morning I realised I could just do it like this:

Code: Select all

DateGadget(0,20,20,100,20,"",0,#DTS_TIMEFORMAT)
So I guess this request should really be to make the #DTS_TIMEFORMAT flag
an official PureBasic one, and cross-platform, such as #PB_Date_TimeFormat.
klaver
Enthusiast
Enthusiast
Posts: 147
Joined: Wed Jun 28, 2006 6:55 pm
Location: Schröttersburg

Post by klaver »

Such flag would be very useful, but is similar widget supported on Linux, MacOS, Amiga?
Post Reply