Class TdkwSplitPanel (unit DKWSpPnl)

Inherits from

TCustomPanel

Constructors


constructor Create ( AOwner : TComponent ) ;

Public declarations


Functions

procedure GetChildren ( Proc: TGetChildProc ) ;

Since the TdkwSplitPanel is the owner, it needs to be responsible for archiving the panels and their contents

procedure Loaded ;

Deal with cut and paste problems in design mode

procedure MouseDown ( Button: TMouseButton ; Shift: TShiftState; X, Y: Integer ) ;

When the user clicks in an exposed are of the SplitPanel it can be assumed to be a splitbar drag operation.

procedure MouseMove ( Shift: TShiftState; X, Y: Integer ) ;

Perform real-time resplitting of the SplitPanel during drag operations

procedure MouseUp ( Button: TMouseButton ; Shift: TShiftState; X, Y: Integer ) ;

Final cleanup is required when the splitbar is released

procedure ReadState ( Reader: TReader ) ;

Since the TdkwSplitPanel class archives TPanel instances without Delphi's knowledge, we need to register the class just before reading instances from the archive

procedure Resize ;

Adjust the sub-panels during resize events

function GetBevel ( Index: Integer ): TPanelBevel ;

<< Write comment here >> *) {procedure TdkwSplitPanel.

procedure Resplit ;

Resize and reposition the sub-panels to the proper ratios

procedure SetAdjustable ( NewState: Boolean ) ;

Adjust the sub-panels when the adjustability changes

procedure SetBevel ( Index: Integer; Value: TPanelBevel ) ;

Allow indirect manipulation of the bevel type for sub-panels

procedure SetOrientation ( NewState: TdkwSplitPanelOrientation ) ;

Adjust the sub-panels when the orientation changes

procedure SetRatio ( Index: Integer; Value: Integer ) ;

Adjust the sub-panels when the ratio changes

Properties

property Adjustable : Boolean


property Align :

Published declarations

property BevelOne : TPanelBevel


property BevelTwo : TPanelBevel


property Orientation : TdkwSplitPanelOrientation


property RatioOne : Integer


property RatioTwo : Integer


Events

Variables

FAdjustable : Boolean ;


FDragOffset : Integer ;


FOrientation : TdkwSplitPanelOrientation ;


FRatio : Array [ 0 .. 1 ] of Integer ;

Private declarations


Constructors


constructor Create ( AOwner : TComponent ) ;

Public declarations


Functions


procedure GetChildren ( Proc: TGetChildProc ) ;

Since the TdkwSplitPanel is the owner, it needs to be responsible for archiving the panels and their contents


procedure Loaded ;

Deal with cut and paste problems in design mode


procedure MouseDown ( Button: TMouseButton ; Shift: TShiftState; X, Y: Integer ) ;

When the user clicks in an exposed are of the SplitPanel it can be assumed to be a splitbar drag operation.


procedure MouseMove ( Shift: TShiftState; X, Y: Integer ) ;

Perform real-time resplitting of the SplitPanel during drag operations


procedure MouseUp ( Button: TMouseButton ; Shift: TShiftState; X, Y: Integer ) ;

Final cleanup is required when the splitbar is released


procedure ReadState ( Reader: TReader ) ;

Since the TdkwSplitPanel class archives TPanel instances without Delphi's knowledge, we need to register the class just before reading instances from the archive


procedure Resize ;

Adjust the sub-panels during resize events


function GetBevel ( Index: Integer ): TPanelBevel ;

<< Write comment here >> *) {procedure TdkwSplitPanel.InsertControl ( AControl: TControl ) ; begin if ( csDesigning in ComponentState ) then begin if ControlCount > 2 then begin Controls [ 0 ].InsertControl ( AControl ) ; end; end ; end;} (* Allow indirect manipulation of the bevel type for sub-panels


procedure Resplit ;

Resize and reposition the sub-panels to the proper ratios


procedure SetAdjustable ( NewState: Boolean ) ;

Adjust the sub-panels when the adjustability changes


procedure SetBevel ( Index: Integer; Value: TPanelBevel ) ;

Allow indirect manipulation of the bevel type for sub-panels


procedure SetOrientation ( NewState: TdkwSplitPanelOrientation ) ;

Adjust the sub-panels when the orientation changes


procedure SetRatio ( Index: Integer; Value: Integer ) ;

Adjust the sub-panels when the ratio changes


Properties


property Adjustable : Boolean


property Align :

Published declarations


property BevelOne : TPanelBevel


property BevelTwo : TPanelBevel


property Orientation : TdkwSplitPanelOrientation


property RatioOne : Integer


property RatioTwo : Integer


Events


Variables


FAdjustable : Boolean ;


FDragOffset : Integer ;


FOrientation : TdkwSplitPanelOrientation ;


FRatio : Array [ 0 .. 1 ] of Integer ;

Private declarations