Class TPane (unit SplitterWnd)

Inherits from

TScrollBox

********************* TPane ***************************) (

Constructors


Constructor Create( AOwner : TComponent );

************************************************************************) (***************************** TPane *************************************) (*************************************************************************) // Constructor TPane.


Functions

Destructor Destroy;

Destructor TPane.

procedure SetPaneIndex( pIndex : Integer );

procedure TPane.

procedure SetPaneSize( ps : Word );

procedure TPane.

procedure SetSplitterWnd( sw : TSplitterWnd );

procedure TPane.

procedure WMEraseBkgnd( var Message : TWMEraseBkgnd );

procedure TPane.

procedure WMMove( var Message : TWMMove );

Procedure TPane.

procedure WMSize( var Message : TWMSize );

procedure TPane.

Properties

property EraseBkgnd : Boolean


property MinPaneSize : Word


property PaneIndex : Integer


property PaneSize : Word


property SplitterWnd : TSplitterWnd


Events

Variables

FDivPercent : Extended;


FEraseBkgnd : Boolean;


FMinPaneSize : Word;


FPaneIndex : Integer;


FPaneSize : Word;


FSplitterWnd : TSplitterWnd;



Constructors


Constructor Create( AOwner : TComponent );

************************************************************************) (***************************** TPane *************************************) (*************************************************************************) // Constructor TPane.Create // Initialize properties


Functions


Destructor Destroy;

Destructor TPane.Destroy This makes sure that the pane is removed from the splitter window when it is removed. Without doing that, we'll get all kinds of access violations when the pane tries to access the panes.


procedure SetPaneIndex( pIndex : Integer );

procedure TPane.SetPaneIndex( pIndex : Integer ); pIndex : new pane index. This acts a lot like the tabindex property of a TTabSheet. It changes the order of the pane in the splitter window.


procedure SetPaneSize( ps : Word );

procedure TPane.SetPaneSize( ps : Word ); This is one of the more complex procedures. A short explanation on its organization follows: The first few lines of code are going to be executed before the SplitterWnd has been assigned, ie, when the pane is being loaded. If the pane is being loaded, then it is always the last one in the splitter window's list, which makes it a special case and it won't size correctly. If the splitter window has indeed been assigned, then the panes are all loaded, and this is just being added to the splitter window. It may take a few look-overs to understand just what I did here.


procedure SetSplitterWnd( sw : TSplitterWnd );

procedure TPane.SetSplitterWnd( sw : TSplitterWnd ); sw : pointer to the splitter window to set This procedure removes the pane from its old splitter window (if one exists) and calls the new splitter window's InsertPane.


procedure WMEraseBkgnd( var Message : TWMEraseBkgnd );

procedure TPane.WMEraseBkgnd( var Message : TWMEraseBkgnd ); An attempt at fixing some flicker problems. This procedure is tied to a property called EraseBkgnd, which is published.


procedure WMMove( var Message : TWMMove );

Procedure TPane.WMMove( var Message : TWMMove ); Windows message trap. Panes are not to be moved except by the splitter window.


procedure WMSize( var Message : TWMSize );

procedure TPane.WMSize( var Message : TWMSize ); See reasons for this procedure in TPane.WMMove.


Properties


property EraseBkgnd : Boolean


property MinPaneSize : Word


property PaneIndex : Integer


property PaneSize : Word


property SplitterWnd : TSplitterWnd


Events


Variables


FDivPercent : Extended;


FEraseBkgnd : Boolean;


FMinPaneSize : Word;


FPaneIndex : Integer;


FPaneSize : Word;


FSplitterWnd : TSplitterWnd;