Class TRkNavigatorPanel (unit RkNavPnl)

Inherits from

TPanel

Constructors


constructor Create( AOwner : TComponent );

===============================} {== TRkNavigatorPanel Methods ==} {===============================


Functions

destructor Destroy;

Create the drop area list

procedure DefineProperties( Filer : TFiler );

========================================================================= TRkNavigatorPanel.

procedure GetChildren( Proc : TGetChildProc; Root : TComponent );

========================================================================= TRkNavigatorPanel.

procedure Loaded;

These five protected methods must be overridden to ensure that any components dropped onto the drop area are correctly streamed to the form file.

procedure ReadDropList( Reader : TReader );

========================================================================= TRkNavigatorPanel.

procedure WriteDropList( Writer : TWriter );

========================================================================= TRkNavigatorPanel.

procedure CreateDropArea;

========================================================================= TRkNavigatorPanel.

procedure CreateNavigator;


procedure CreateSpacer;

Ensure nav buttons show correct state

function GetDataSource : TDataSource;


function GetDropAreaBorder : TBorderStyle;


function GetFlatButtons : Boolean;

Flat style buttons are only available in Delphi 3.

procedure SetDataSource( Value : TDataSource );


procedure SetDropAreaBorder( Value : TBorderStyle );


procedure SetFlatButtons( Value : Boolean );


Properties

property About : TRkAboutInfo

Run-time access to drop area

property BevelOuter :


property BorderStyle :


property DataSource : TDataSource


property DropAreaBorder : TBorderStyle

Exposing properties of embedded components

property FlatButtons : Boolean


property DropArea : TScrollBox


Events

Variables

FAboutInfo : TRkAboutInfo;


FDropArea : TScrollBox;

Embedded ScrollBox will accept other components dropped onto it

FDropAreaList : TStringList;

Declare an internal string list for each drop area component

FNavigator : TDBNavigator;

Other embedded components

FSpacer : TPanel;



Constructors


constructor Create( AOwner : TComponent );

===============================} {== TRkNavigatorPanel Methods ==} {===============================


Functions


destructor Destroy;

Create the drop area list


procedure DefineProperties( Filer : TFiler );

========================================================================= TRkNavigatorPanel.DefineProperties In order to correct the parent hierarchy, a list of all controls that were dropped into the drop area must be stored in the stream along with the component. To do this, we define a new custom property using this method. =========================================================================


procedure GetChildren( Proc : TGetChildProc; Root : TComponent );

========================================================================= TRkNavigatorPanel.GetChildren This method is responsible for changing the parent hierarchy when the component is written to a stream. This method is called by Delphi to determine which components are children of the main component. We override this method to tell Delphi to treat all of the components dropped into the drop area as children of the main component rather than children of the embedded ScrollBox. The parent hierarchy is corrected in the Loaded method. =========================================================================} {$IFDEF VER100


procedure Loaded;

These five protected methods must be overridden to ensure that any components dropped onto the drop area are correctly streamed to the form file.

========================================================================= TRkNavigatorPanel.Loaded This method is responsible for "correcting" the parent hierarchy within the compound component. That is, when the component is written to a stream, the Parent of all controls dropped onto the drop area are changed to the main component rather than the drop area. This is necessary in order to support form inheritance. This method, corrects the Parent hierarchy by iterating through the FDropAreaList. =========================================================================


procedure ReadDropList( Reader : TReader );

========================================================================= TRkNavigatorPanel.ReadDropList This method is called whenever the DropAreaList custom property needs to be read from a stream. Each component identifier that was stored in the stream is read and saved into the FDropAreaList string list. =========================================================================


procedure WriteDropList( Writer : TWriter );

========================================================================= TRkNavigatorPanel.WriteDropList This method is called whenever the DropAreaList custom property needs to be written to a stream. The identifier of each control dropped onto the drop area is stored in the stream. =========================================================================


procedure CreateDropArea;

========================================================================= TRkNavigatorPanel.CreateDropArea This method is responsible for creating the FDropArea instance. This method also creates the string list to be associated with the drop area. The string list will be used to store which components are contained within the drop area when the component is written to a stream. =========================================================================


procedure CreateNavigator;


procedure CreateSpacer;

Ensure nav buttons show correct state


function GetDataSource : TDataSource;


function GetDropAreaBorder : TBorderStyle;


function GetFlatButtons : Boolean;

Flat style buttons are only available in Delphi 3.0


procedure SetDataSource( Value : TDataSource );


procedure SetDropAreaBorder( Value : TBorderStyle );


procedure SetFlatButtons( Value : Boolean );


Properties


property About : TRkAboutInfo

Run-time access to drop area


property BevelOuter :


property BorderStyle :


property DataSource : TDataSource


property DropAreaBorder : TBorderStyle

Exposing properties of embedded components


property FlatButtons : Boolean


property DropArea : TScrollBox


Events


Variables


FAboutInfo : TRkAboutInfo;


FDropArea : TScrollBox;

Embedded ScrollBox will accept other components dropped onto it


FDropAreaList : TStringList;

Declare an internal string list for each drop area component


FNavigator : TDBNavigator;

Other embedded components


FSpacer : TPanel;