Class TDBBitwiseCheckBox (unit Bitwise)

Inherits from

TLiteCheckBox

Bitwise components manipulate a single bit within a data field. TDBBitwiseCheckBox works just like TDBCheckBox except that you also specify a value; typically a power of 2 (1,2,4,8,16,32,.. 16384) If the box is checked, that value is OR'd with the field's value. If the box is unchecked, that value is NOT AND'd with the field's value. This is set with CheckValue. Caveat: the underlying data field MUST be an integer. TDBBitwiseRadioButton works the same way except it looks like a radio button. Here, since the "other" radio buttons in the group presumably correspond to other enumerated values, the field is set to CheckValue when the button is pressed. For example, you might have four radio buttons with checkValues 1,2,3,4 to indicate one of four choices. For the CheckBoxes, you would have one of four values 1,2,4,8 for the sixteen possible permutations. Caveat: the underlying data field MUST be an integer.

Constructors


constructor Create( owner: TComponent );

A change to the underlying data is reflected in the state of the checkbox.


Functions

destructor Destroy;


procedure KeyPress( var Key: Char );


procedure Notification( AComponent: TComponent; Operation: TOperation );


procedure Toggle;


procedure CMExit( var Message: TCMExit );


procedure DataChange( sender: TObject );


function GetDataField: String;

TDBBitwiseCheckBox

function GetDataSource: TDataSource;


procedure SetDataField( const value: String );


procedure SetDataSource( value: TDataSource );


procedure UpdateData( Sender: TObject );


Properties

property CheckValue : Integer


property DataField : String


property DataSource : TDataSource


property State :


Events

Variables

FDataLink : TFieldDataLink;


myCheckValue : Integer;



Constructors


constructor Create( owner: TComponent );

A change to the underlying data is reflected in the state of the checkbox.


Functions


destructor Destroy;


procedure KeyPress( var Key: Char );


procedure Notification( AComponent: TComponent; Operation: TOperation );


procedure Toggle;


procedure CMExit( var Message: TCMExit );


procedure DataChange( sender: TObject );


function GetDataField: String;

TDBBitwiseCheckBox


function GetDataSource: TDataSource;


procedure SetDataField( const value: String );


procedure SetDataSource( value: TDataSource );


procedure UpdateData( Sender: TObject );


Properties


property CheckValue : Integer


property DataField : String


property DataSource : TDataSource


property State :


Events


Variables


FDataLink : TFieldDataLink;


myCheckValue : Integer;