Set unchecked DateGadget value to -1, please.

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
es_91
Enthusiast
Enthusiast
Posts: 298
Joined: Thu Jan 27, 2011 12:00 pm
Location: DE

Set unchecked DateGadget value to -1, please.

Post by es_91 »

The Doc says:
PB Documentation wrote:If you specify #PB_Date_Checkbox in the Flags parameter, the Gadget will have a checkbox with which the user can set the Gadget to 'no date' [...]. While the checkbox is unchecked, GetGadgetState() will return 0. To change the state of the checkbox, use SetGadgetState() with either 0 (=checkbox unchecked) or any valid date.
Since '0' is a valid date, and the usual date error code is '-1', why not use '-1' for an unchecked DateGadget?
:mrgreen:
chris319
Enthusiast
Enthusiast
Posts: 782
Joined: Mon Oct 24, 2005 1:05 pm

Re: Set unchecked DateGadget value to -1, please.

Post by chris319 »

This is a good idea.
Post Reply