Class TrDBCheckListBox

Unit

Declaration

type TrDBCheckListBox = class(TCheckListBox)

Description

DB version of TCheckListBox for n:m relationship

Hierarchy

  • TCheckListBox
  • TrDBCheckListBox

Overview

Methods

Public procedure UpdateChecklistState; virtual;
Public procedure DoLoadItemList; virtual;
Public procedure DoLoadItemValues; virtual;
Public procedure DoSaveItemValues; virtual;
Public procedure DoCancelItemValues; virtual;
Public function CheckedCount: integer;
Public procedure FilterItemsList; virtual;
Public procedure SelectItemsList; virtual;
Public procedure SetItemState(AItemIndex: integer; AChecked: boolean);
Public procedure SetAllItemsState(AChecked: boolean);
Public procedure StoreItemsForDuplication;
Public procedure RestoreDuplicatedItems;
Public function GetCheckedItemsList(Separator: string; UseItemObjectAsInt: boolean = false): string;

Properties

Public property Field: TField read GetField;
Published property DataField: string read GetDataField write SetDataField;
Published property DataSource: TDataSource read GetDataSource write SetDataSource;
Published property ReadOnly: boolean read FReadOnly write SetReadOnly default false;
Published property DefaultPrefix: string read FDefaultPrefix write SetDefaultPrefix;
Published property ReadOnlyColor: TColor read FReadOnlyColor write FReadOnlyColor default clBtnFace;
Published property DBEditLabel: TDBBoundLabel read FDBEditLabel;
Published property BoundLabel: rDBComponents.TBoundLabel read FBoundLabel;
Published property FindEdit: TBoundButtonedEdit read FFindEdit;
Published property FindEditSpace: integer read FFindEditSpace write SetFindEditSpace default 4;
Published property FindItemsStyle: TFindItemsStyle read FFindItemsStyle write SetFindItemsStyle default fisNone;
Published property CheckItemsStyle: TCheckItemsStyle read FCheckItemsStyle write SetCheckItemsStyle default chsAllItems;
Published property OnLoadItemList: TLoadSaveItemList read FOnLoadItemList write FOnLoadItemList;
Published property OnLoadItemValues: TLoadSaveItemList read FOnLoadItemValues write FOnLoadItemValues;
Published property OnSaveItemValues: TLoadSaveItemList read FOnSaveItemValues write FOnSaveItemValues;
Published property PostponedSaving: boolean read FPostponedSaving;
Published property PostponeSaveNewRecord: boolean read FPostponeSaveNewRecord write FPostponeSaveNewRecord default false;
Published property CheckboxUpdateMode: TCheckboxUpdateMode read FCheckboxUpdateMode write FCheckboxUpdateMode default chmCheckboxClick;

Description

Methods

Public procedure UpdateChecklistState; virtual;

update state of all items according dataset state

Public procedure DoLoadItemList; virtual;

load list of available items to FAllItemsList

Public procedure DoLoadItemValues; virtual;

load and set state (check/uncheck) of all items

Public procedure DoSaveItemValues; virtual;

store state (check/uncheck) of all items

Public procedure DoCancelItemValues; virtual;

cancel all changes and load previous state

Public function CheckedCount: integer;

indicates count of checked items

Public procedure FilterItemsList; virtual;

show list of items in CheckListBox according filter state

Public procedure SelectItemsList; virtual;

select item in the list of items in CheckListBox according filter text

Public procedure SetItemState(AItemIndex: integer; AChecked: boolean);

programmatically set state of one item

Public procedure SetAllItemsState(AChecked: boolean);

programmatically set state of all items

Public procedure StoreItemsForDuplication;

store state (check/uncheck) of all items for duplication to another record

Public procedure RestoreDuplicatedItems;

restore state (check/uncheck) of all items from state stored by StoreItemsForDuplication

Public function GetCheckedItemsList(Separator: string; UseItemObjectAsInt: boolean = false): string;

get list of checked items

Properties

Public property Field: TField read GetField;

returns linked Field

Published property DataField: string read GetDataField write SetDataField;
 
Published property DataSource: TDataSource read GetDataSource write SetDataSource;
 
Published property ReadOnly: boolean read FReadOnly write SetReadOnly default false;
 
Published property DefaultPrefix: string read FDefaultPrefix write SetDefaultPrefix;

define prefix for auto-named function (name of component is set according datafield)

Published property ReadOnlyColor: TColor read FReadOnlyColor write FReadOnlyColor default clBtnFace;

define color for not edit state

Published property DBEditLabel: TDBBoundLabel read FDBEditLabel;

define properties of bound label

Published property BoundLabel: rDBComponents.TBoundLabel read FBoundLabel;

define properties of bounded label

Published property FindEdit: TBoundButtonedEdit read FFindEdit;

define properties of bound find editor

Published property FindEditSpace: integer read FFindEditSpace write SetFindEditSpace default 4;

define horizontal space between checkbox and find edit

Published property FindItemsStyle: TFindItemsStyle read FFindItemsStyle write SetFindItemsStyle default fisNone;

define using of Find edit box below listbox

Published property CheckItemsStyle: TCheckItemsStyle read FCheckItemsStyle write SetCheckItemsStyle default chsAllItems;

define order of items in listbox

Published property OnLoadItemList: TLoadSaveItemList read FOnLoadItemList write FOnLoadItemList;

event for loading of item list

Published property OnLoadItemValues: TLoadSaveItemList read FOnLoadItemValues write FOnLoadItemValues;

event for loading of item values

Published property OnSaveItemValues: TLoadSaveItemList read FOnSaveItemValues write FOnSaveItemValues;

event for saving of item values

Published property PostponedSaving: boolean read FPostponedSaving;

indicate that values should be saved after saving of record (used for new record without ID value before post)

Published property PostponeSaveNewRecord: boolean read FPostponeSaveNewRecord write FPostponeSaveNewRecord default false;

define whether postponed saving should be used for new record (to avoid database error in relationship

Published property CheckboxUpdateMode: TCheckboxUpdateMode read FCheckboxUpdateMode write FCheckboxUpdateMode default chmCheckboxClick;

define mode for checkbox update


Generated by PasDoc 0.15.0.