Unit AMCbRb

AM Software's CheckBox and RadioButton-controls version 1.0 for Delphi 2.x and 3.x Copyright © September 1997 by Alexander Meeder These controls are the same as the standard Delphi CheckBox and RadioButton except for the fact that you can make a tiny bitmap (a glyph) with four (or three for AMRadioButton) different glyphs in it to represent the different states of a CheckBox/Radiobutton: Unchecked, Checked, Disabled and Grayed. I've used a rather unconventional technique just for the efficiency of the controls. Because you probably will use more than one TAMCheckBox/TAMRadioButton-descendant at a time it's more efficient to share the same glyph stored in one object, than a glyph in every instance of the controls. This package come with several example Glyphs. When you want to draw them yourself follow these steps: * every bitmap must contain 3 or 4 glyphs and every glyph must be the same width, there are no restrictions for the dimensions of the bitmap as a whole * the glyphs must be in the following order: Off/Unchecked, On/Checked, Disabled and Grayed (the last only for TAMCheckBox). A little enhancement over the Delphi controls is that you can use multi-line captions, even with tab-stops of which you can set the indent by using the tab-property. To use the controls follow these steps: 1. Place a TAMCbRbHost-component on your form 2. Place 1 of more TAMCheckBox/TAMRadioButton controls on your form 3. Select those controls and set the 'Host'-property to refer to the TAMCbRbHost-component 4. Set the desired properties of TAMCbRbHost: Font(In)Active, Glyph, Margin, NumGlyphs, TransparentColor 5. Set the desired properties of TAMCheckBox, TAMRadioButton: Tab Two extra events: MouseEnter MouseLeave Quastions, suggestions? Mail me at: ameeder@dds.nl

Classes

TAMCbRbHost -
TAMCheckBox -
TAMRadioButton -
TFontPA - Forward declaration of TAMCbRbHost-class

Functions

Register -

Types

TCheck
TCmMouseEnter
TCmMouseLeave
TMargin
TMouseEnter
TMouseLeave
TTab

Constants

Variables


Functions


procedure Register;


Types


TCheck = (BmpOff, BmpOn, BmpDisabled, BmpGrayed);

TCmMouseEnter = record
Msg : Cardinal;
Unused : Integer;
Sender : TControl;
Result : LongInt;
end;

TCmMouseLeave = TCmMouseEnter

TMargin = 1..25

TMouseEnter = procedure (Sender: TControl; var Message: TCMMouseEnter) of object

TMouseLeave = procedure (Sender: TControl; var Message: TCMMouseLeave) of object

TTab = 1..10

Constants


Variables