[Gambas-user] Further info on DataaCheckBox Bugs

Benoît Minisini gambas at ...1...
Mon Dec 2 02:15:54 CET 2013


Le 02/12/2013 01:58, Marty a écrit :
> I have cross checked the properties and events between the CheckBox
> control and the DataCheckBox control and find them to be different. The
> CheckBox control supports the trisate property, the first click sets
> false the second true and the click event works as expected. The
> DataCheckBox does not have the tristate property. The syntax checker
> says it's not a valid property. The DataCheckBox click event is not
> raised when the user clicks on the control. The DataCheckBox requires
> three clicks to change between true and false.
>
> This appears to be a bug in the DataCheckBox control. It would be simple
> to test. Just a form with a datasource attached to a MySQL table and a
> DataCheckBox control. I need to use the DataCheckBox and it's Click
> event in my project. Would appreciate one of the Gambas experts comments
> and advice on a possible work around.
>
> Marty
>

DataCheckBox is a data-bound control that aims at displaying the value 
of a Boolean database field. Hence, it can takes three different values 
(True, False and Null), or two (True and False) if the field is mandatory.

The tristate value of a DataCheckBox only depends on the database field 
definition, so there is no need for a tristate property.

There is actually a bug in DataCheckBox where the mandatory status is 
not detected. I will try to fix it.

As for the Click event, a data bound control directly modifies the 
database field it is associated with. So, normally, you don't need the 
Click event.

Regards,

-- 
Benoît Minisini




More information about the User mailing list