CheckBox - True/False

The place for threads about TimoSoft ButtonControls.
Post Reply
User avatar
itmg
Lieutenant
Posts: 13
Joined: 14 Jul 2009, 12:04

CheckBox - True/False

Post by itmg »

Hi,
new problem with the CheckBox control.
My SQL Server Table has a datacolumn which stores a boolean; values: True/False (-1/0).
The checkbox control is bound to this data field. I thought the checkbox will be checked when the value of the datafield is 'true'. But it only get the 'SelectionState' = 'checked', when the value of the data field is 1.

ButtonControls 1.4 Unicode
EditControls 1.4 Unicode
DateTimeControls 1.1 Unicode
Statusbar 1.2 Unicode
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: CheckBox - True/False

Post by TiKu »

Currently, negative values raise an error. Although it seems dirty, I think I'll simply allow a value of -1 and handle it like 1 (Checked).
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: CheckBox - True/False

Post by TiKu »

Try the attached revision. It handles -1 like 1 (ssChecked).
Attachments
BtnCtls142109-Release.zip
Pre-release of ButtonControls 1.4.2
(226.73 KiB) Downloaded 604 times
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
itmg
Lieutenant
Posts: 13
Joined: 14 Jul 2009, 12:04

Re: CheckBox - True/False

Post by itmg »

it works.

Thank you!

ButtonControls 1.4 Unicode
EditControls 1.4 Unicode
DateTimeControls 1.1 Unicode
Statusbar 1.2 Unicode
Post Reply