SetGadgetItemState() only clears specific dates, but it used to clear the entire CalendarGadget() of bold dates in older versions of PureBasic; so there must be some quick API way to bulk-remove them without freeing and recreating the gadget? Recreating means I lose the current view of the user (even more so when the gadget shows multiple months). MSDN says to use RemoveAllBoldedDates() but that isn't an API call that I can find?
[Edit] Okay, I came up with the following, which is pretty much instant, but still...
Code: Select all
Procedure ClearAllBoldCalendarDates(gad)
first=Date(1970,1,1,0,0,0)
last=Date(2038,1,19,3,14,7)
For d=first To last Step 86400
SetGadgetItemState(gad,d,#PB_Calendar_Normal)
Next
EndProcedure