-------------------------------------------------------------------------------------} { A "CheckListBox" component for Delphi32. } { Copyright 1997, Patrick Brisacier. All Rights Reserved. } { This component can be freely used and distributed in commercial and private } { environments, provided this notice is not modified in any way. } { -------------------------------------------------------------------------------------} { Feel free to contact us if you have any questions, comments or suggestions at } { PBrisacier@mail.dotcom.fr (Patrick Brisacier) } { -------------------------------------------------------------------------------------} { Date last modified: 07/05/96 } { -------------------------------------------------------------------------------------} { -------------------------------------------------------------------------------------} { TPBCheckListBox v1.06 } { -------------------------------------------------------------------------------------} { Description: } { A component that adds check property to ListBoxes items. } { Added Properties to ListBox: } { property Checked[Index: Integer]: Boolean; "Run-time only property" } { property State[Index: Integer]: TCheckBoxState; "Run-time only property" } { property AllowGrayed: Boolean; } { property Flat: Boolean; } { property FixedSize: Boolean; } { property Offset: Integer; } { property BmpChecked: TBitmap; } { property BmpGrayed: TBitmap; } { property BmpUnchecked: TBitmap; } { } { See example contained in example.zip file for more details. } { -------------------------------------------------------------------------------------} { Revision History: } { 1.00: + Initial release } { 1.01: + Modified by Davide Moretti } { + Changed the drawing method to use a scaleable checkmark image } { + Added the 'Flat' property to select the checkmark type (3D or flat) } { + Added a keyboard handle to select items with } { + Correctly frees item objects when component is destroyed } { 1.02: + Modified by Patrick Brisacier (Thanks to Davide) } { + Add the 'FixedSize' property to select the checkbox size (Fix or scaleable) } { + Add three bitmap properties for custom checkbox } { 1.03: + Modified by Davide Moretti } { + Now if FixedSize is True, the minimum item height is 15 even if the font } { is smaller } { 1.04: + Modified by Patrick Brisacier } { + if we use bitmap the minimum item height is the height of the bitmap +2 } { pixels. (I suppose that all the bitmaps have the same height) } { 1.05: + Modified by Patrick Brisacier (thanks to Enrico Lodolo) } { + avoid flickering by adding a new method 'InvalidateCheck' which redraw only } { one checkbox. } { 1.06: + Modified to work with Delphi 3 (TCheckListBox renamed in TPBCheckListBox to } { avoid a conflict with the same named component provided with Delphi 3) } { -------------------------------------------------------------------------------------TItemState -
TPBCheckListBox -
Register - if we use bitmaps, the min height must be the height of the bitmap +2 pixels
procedure Register;
if we use bitmaps, the min height must be the height of the bitmap +2 pixels