Class TmwCustomCompoundComponent (unit mwCuCoCo) |
Inherits from
TPanel
constructor Create(Owner: TComponent);
- Public declarations
Create a CustomCompoundComponent and set some default properties.
procedure DefineProperties(Filer: TFiler);
This component has two fake properties, TextHeight and PixelsPerInch.
procedure GetPixelsPerInch(Reader: TReader);
SetTextHeight
procedure GetTextHeight(Reader: TReader);
Consider this is a panel.
function RunTime: Boolean;
SetPixelsPerInch
procedure SetPixelsPerInch(Writer: TWriter);
GetPixelsPerInch
procedure SetTextHeight(Writer: TWriter);
GetTextHeight
procedure WMNCHitTest(var NCTest: TWMNCHitTest);
RunTime
property BorderStyle : TBorderStyle
Published declarations
property MoveAble : Boolean
fBorderStyle : TBorderStyle;
fMoveAble : Boolean;
fTextHeight : Integer;
Private declarations
constructor Create(Owner: TComponent);
Public declarations
Create a CustomCompoundComponent and set some default properties.
procedure DefineProperties(Filer: TFiler);
This component has two fake properties, TextHeight and PixelsPerInch.
The form editor stores these properties in the .DFM file, TextHeight
always and PixelsPerInch in some cases.
This will only be a problem if you use the form editor as a component editor.
However what is stored in the .DFM file must be handled.
You may use the the TextHeight Property to store any integer value.
procedure GetPixelsPerInch(Reader: TReader);
SetTextHeight
procedure GetTextHeight(Reader: TReader);
Consider this is a panel. To prevent your user from dropping
any other controls on it, you must set the ControlStyle accordingly.
function RunTime: Boolean;
SetPixelsPerInch
procedure SetPixelsPerInch(Writer: TWriter);
GetPixelsPerInch
procedure SetTextHeight(Writer: TWriter);
GetTextHeight
procedure WMNCHitTest(var NCTest: TWMNCHitTest);
RunTime
property BorderStyle : TBorderStyle
Published declarations
property MoveAble : Boolean
fBorderStyle : TBorderStyle;
fMoveAble : Boolean;
fTextHeight : Integer;
Private declarations