Copyright: Copyright © 1995-1996 Strategic Applications
Citation: PowerPanel for Delphi Version 2.01                Copyright © 1995-1996 Strategic Applications


Contents

PowerPanel for Delphi Version 2.00

The PowerPanel collection of components will provide your application with the ability to move and resize any component at run time. These components will optionally allow the run time position and size to be saved in a INI file. PowerPanel also includes component editors to aid in the customizing of these panels. Added to this suite was TGlobalAttributes component to allow you to globally update all or any PowerPanels properties visually. This feature is optional, you can still use the object inspector if you prefer.

Here is a list of topics available for online help:

TPowerPanel

TGlobalAttributes

TAttributes Class

Properties

Methods

TPowerPanel Component Editor

TGlobalAttributes Component Editor

Components

Installing

Disclaimer

Thank You

Registration


Registration

This is a shareware product. Registration is $30.00. Upon registration you will receive full source code and support via Compuserve.You Can register PowerPanel through CompuServe. Type Go Swreg in a compuserve go prompt.The registration number is 8131. If you are unable to register via Compuserve, E-Mail us and we will make other arrangements.

Unregistered copies will only run from the Delphi IDE.


TPowerPanel

Properties 	Methods

The PowerPanel components are a collection of 19 visual components based on Delphi's TCustomPanel. These components give your application a very flexible means of resizing or moving virtually any component at runtime. This package includes sizable versions of many of Delphi's standard components.

TPowerPanel has built-in logic to turn off resizing of a particular border depending on the components align property. For example, if you have added a TPowerPanel to a form and set the align property to albottom, then only the top border is resizable. This is because the other borders of the component will be controlled by its parents size.

All of the PowerPanel components provide a component editor registered as TPowerPanelComponentEditor. This editor will allow you to modify properties visually at design time. To access the component editor simply double-click on the PowerPanel you would like to edit.

Properties

TGlobalAttributes

TAttributes Class


TGlobalAttributes

TGlobalAttributes = class(TComponent)

The TGlobalAttributes component is provided to globally modify the Attributes property of PowerPanel components. This component contains an Attributes property just like all of the PowerPanel components. This allows you to set some extended properties on the TGlobalAttributes component and then apply them to all PowerPanels or selected PowerPanels.

To accomplish this you would do the following:

•	Add as many PowerPanels as you like to a form.

•	Add a TGlobalAttributes component to the same form.

•	Double click on the TGlobalAttributes component to access the component editor.

•	Set the properties you would like to apply to your PowerPanels.

•	Click the Global Options button. This opens the TGlobalAttributes Component Editor .

•	In the top portion of the screen check the properties you would like to apply. Hint: Right mouse button pops up a menu to select or deselect all properties.

•	In the PowerPanels listbox select the panels you would like to affect.

•	After the panels have been selected click the apply button.

TAttributes Class

TPowerPanel


TAttributes Class

TAttributes = class(TPersistent)

The TAttributes class contains all of the extended properties used in TPowerPanel and TGlobalAttributes components. This class is provided so that all of the extended properties are kept together in the object inspector. Sometimes when working with a new component it can be confusing finding the necessary properties in the Object Inspector.

This class provides no methods or events. It is used to hold property values that will be used by other classes.


Borders

Just as you can resize any of the four sides of a panel, you can also resize the panel by any of it's corners. This is available as long as the two borders of the corner are resizable. For example, if the panel is aligned left, then you can only resize the right border, and therefore, none of the corners will be available for sizing.


Components

The following components ship with PowerPanel:

Component	Description

TGlobalAttributes	Component used to globally apply property values.

TPowerPanel	Sizable/Movable component based on TCustomPanel.

TPPCap	Sizable Panel with a caption(similar to a window).

TPPLabel	Sizable Label Component.

TPPStatusPanel	Sizable StatusPanel with sizable sections.

TPPEdit	Sizable Edit Component.

TPPListBox	Sizable Listbox with caption.

TPPMemo	Sizable Memo with caption.

TPPOutLine	Sizable Outline with caption.

TPPTabbedNB	Sizable TabbedNotebook with caption.

TPPTabsetAndNB	Sizable Notebook/Tabset with caption.

TPPStringGrid	Sizable StringGrid with caption.

TPPDrawGrid	Sizable DrawGrid with caption.

TPPDirList	Sizable Directory Listbox with caption.

TPPFileList	Sizable FileListbox with caption.

TPPFileManager	Combined Filelistbox, Directory Listbox, Drivebox and Filterbox with caption.

TPPDBGrid	Sizable DBGrid with caption.

TPPDBGridAccess.	Sizable DBGrid with navigator, status panel with sizable section and a caption

TPPDBNav	Siziable Navigator.

TPPDBNavSplit	Two Navigators, with a status panel with sizable sections between the navigators.


Properties

Almost all of the PowerPanel properties are contained in the TAttributes Class . Each PowerPanel component will have an Attributes property. When expanded in the object inspector the following properties will be available.

AllowBeeps

AllowRollup

CursorMoving

CursorSizingEW

CursorSizingNS

GridAlignment

HideChildren

HideSiblings

IniFileName

IniLog

IniPrefix

IniSectionName

MaxHeight

MaxWidth

MinHeight

MinWidth

Movable

MovableHorz

MovableVert

MoveColor

MoveParent

SizableBottom

SizableLeft

SizableRight

SizableTop

StayVisible

TrackPanel

TrackPositions


TrackPanel

Use this property to set a destination panel to display the tracking information for this panel.

This property will allow any component that is a decendent of TPanel to specified.


GridAlignment

Use the GridAlignment property to control the grid sizing that a panel can be moved or resized on. For example, if you set GridAlignment to a value of 2, when you move the panel at runtime the left and top properties will alway change based on increments of 2.


AllowBeeps

Use the AllowBeeps property to enable or disable error beeps. Error beeps are produced when an attempt has been made to size or move a panel beyond its parent boundry.

To enable error beeping set this property to true.. To disable beeping set this property  to false.


AllowRollup

Use the AllowRollup property to enable or disable the abilty to roll up the parent container. The rollup will be performed when a panel is aligned to either altop, albottom, alleft or alright and the right mouse button has been clicked. You may also call the rollitup method directly to perform the rollup.

To enable rollups set this property to true. To disable Rollups set this property to false.


MinWidth

Property MinWidth: integer;

Use the MinWidth property to control the width of the PowerPanel. This property is measured in pixels. During resizing the panels width will not be permitted to go below the value of this property. If you set this property to -1 then no minimum width checking will be performed.

Example:

To limit the width of a panel to no less then 50 pixels:

MyPanel.Attributes.MinWidth := 50;


MaxWidth

Property MaxWidth: integer;

Use the MaxWidth property to control the width of the PowerPanel. This property is measured in pixels. During resizing the panels width will not be permitted to go beyond the value of this property. If you set this property to -1 then no maximum width checking will be performed.

Example:

To limit the width of a panel to no Greater then 500 pixels:

MyPanel.Attributes.MaxWidth := 500;


MinHeight

Property MinHeight: integer;

Use the MinHeight property to control the height of the PowerPanel. This property is measured in pixels. During resizing the panels height will not be permitted to go below the value of this property. If you set this property to -1 then no minimum Height checking will be performed.

Example:

To limit the height of a panel to no less then 50 pixels:

MyPowerPanel.Attributes.MinHeight := 50;


MaxHeight

Property MaxHeight: integer;

Use the MaxHeight property to control the height of the PowerPanel. This property is measured in pixels. During resizing the panels height will not be permitted to go beyond the value of this property. If you set this property to -1 then no maximum height checking will be performed.

Example:

To limit the height of a panel to no Greater then 500 pixels:

MyPanel.Attributes.MaxHeight := 500;


SizableTop

Property SizableTop: boolean;

Use the SizableTop to enable or disable the ability to resize the top border of a PowerPanel. There are times when certain borders will not be resizable due to the align property of the panel.

Example:

To disable resizing of the top of the panel:

MyPanel.Attributes.SizableTop :=  false;


SizableBottom

Property SizableBottom: boolean;

Use the SizableBottom to enable or disable the ability to resize the bottom  border of a PowerPanel. There are times when certain borders will no be resizable due o the align property of the panel.

Example:

To disable resizing of the bottom of the panel:

MyPanel.Attributes.SizableBottom :=  false;


SizableLeft

Property SizableLeft: boolean;

Use the SizableLeft to enable or disable the ability to resize the left side  of a PowerPanel. There are times when certain borders will no be resizable due to the align property of the panel.

Example:

To disable resizing of the left of the panel:

MyPanel.Attributes.SizableLeft :=  false;


SizableRight

Property SizableRight: boolean;

Use the SizableRight to enable or disable the ability to resize the right side  of a PowerPanel. There are times when certain borders will no be resizable due to the align property of the panel.

Example:

To disable resizing of the right of the panel:

MyPanel.Attributes.SizableRight :=  false;


Movable

Property Movable: boolean;

Use the Movable property to enable or disable the ability to move the panel at runtime using the mouse.

Example:

To disable moving of the panel:

MyPanel.Attributes.Movable :=  false;


MovableVert

Property MovableVert: boolean;

Use the MovableVert property to enable or disable the ability to move the panel vertically at runtime using the mouse.

Example:

To disable vertical  movement of the panel:

MyPanel.Attributes.MovableVert :=  false;


MovableHorz

Property MovableHorz: boolean;

Use the MovableHorz property to enable or disable the ability to move the panel horizontally at runtime using the mouse.

Example:

To disable horizontal  movement of the panel:

MyPanel.Attributes.MovableHorz :=  false;


MoveParent

Property MovableParent: boolean;

Use the MovableParent to have a parent panel move with a child PowerPanel. This is the method used with the components that have a caption panel aligned to the top of its parent(TPPListBox). When you hold the left mouse button down in the caption area and move the mouse, the parent moves.

Example:

To have the parent of MyPanel move with it.

MyPanel.Attributes.MoveParent :=  true;


MoveColor

Property MoveColor: TColor;

Use the MoveColor property to specify the background color of a panel as it is being moved. After movement the panel will be restored to its original color.

Example:

To have the panel change to red during movement.

MyPanel.Attributes.MoveColor :=  clRed;


HideChildren

Property HideChildren: boolean;

Use the HideChildren property to control the hiding of any child controls during resizing. This is useful to eliminate screen flicker during resizing. If your panel dosnt have many child controls you can probably set this property to false.

Example:

To hide all child controls during resizing.

MyPanel.Attributes.HideChildren :=  true;


HideSiblings

Property HideSiblings: boolean;

Use the HideSibling property to control the hiding of any sibling controls during resizing. This is useful to eliminate screen flicker during resizing. If your panel dosnt have many Sibling controls you can probably set this property to false.

Example:

To hide all sibling controls during resizing.

MyPanel.Attributes.HideSibling:=  true;


Siblings

A sibling control is any control that has the same parent control as the control being resized.


StayVisible

Property StayVisible: boolean;

Use the StayVisible property to force a child or sibling to be visible during resizing. This is useful if you would like to hide most of the children or siblings but not all of them.

Example:

To show panel regardless of other PowerPanel settings.

MyPanel.Attributes.StayVisible:=  true;


TrackPositions

Property TrackPositions: boolean;

Use the TrackPositions property  to display the mouse coordinates in the panels caption during resizing.

If this property is true and the panel has a caption, then the caption will be saved during resizing and restored after the resizing is complete.

Example:

To show mouse coordinates in the panel caption.

MyPanel.Attributes.TrackPositions:=  true;


EdgeOffset

Property EdgeOffset: integer;

Use the EdgeOffset property to control the sensitivity of the mouse cursor as it moves over the borders of the panel. This is an integer property that relates to the number of pixels from the edge. A value of six to ten pixels seems to work pretty well.

Example:

To specify an edgeoffset of 8 pixels.

MyPanel.Attributes.EdgeOffset :=  8;


CursorMoving

Property CursorMoving: TCursor;

Use the CursorMoving property to specify which cursor is to be use when moving a panel..

Example:

To specify crArrow as the cursor.

MyPanel.Attributes.CursorMoving :=  crArrow;


CursorSizingNS

Property CursorSizingNS: TCursor;

Use the CursorSizingNS property to specify which cursor is to be use when the mouse moves over the  top or bottom Borders

Example:

To specify crSizeNS as the cursor.

MyPanel.Attributes.CursorSizingNS :=  crSizeNS;


CursorSizingEW

Property CursorSizingEW: TCursor;

Use the CursorSizingEW property to specify which cursor is to be use when the mouse moves over the  top or bottom Borders

Example:

To specify crSizeWE as the cursor.

MyPanel.Attributes.CursorSizingEW :=  crSizeWE;


IniFileName

Property IniFileName: TFileName;

Use the IniFileName property to specify an INI file to hold run time postition and size settings of a PowerPanel. If this property is null and the IniLog property is set to true the application name with an .ini extention will be used.


IniLog

Use the IniLog property to enable or disable ini logging of PowerPanel position and size properties. If this property is false no logging will take place.


IniSectionName

Use the IniSectionName property to specify a section within the ini file to place the properties of the PowerPanel. If this property is null the name of the component will be used as the sectionname.

Version 1.xx of PowerPanel used PowerPanels as the default for this property.


IniPrefix

Use the IniPrefix property to specify the prefix value for each property being logged. If this property is null, and the IniSectionName is not null then the name of the component will be used as a prefix. If both the IniSectionName and IniPrefix are null then there will be no prefix for the stored values.

Version 1.xx of PowerPanel used the component name  as the default for this property.


Methods

The following is a list of PowerPanel methods.

RollitUp

ResetIni

EraseIni


RollitUp

Syntax: TPowerPanel.RollitUp;

The RollitUp method is used to toggle between a panel that is rolled up or expanded. The AllowRollUp property must be set to true for this method to do anything. If you have enabled INI logging, the rolled up state will be saved, and restored at run time.

This method will be called automatically when you click the right mouse button on a PowerPanel.

For this method to execute the PowerPanels align property must be set to one of the following: altop, albottom, alleft or alright.

When a PowerPanels RollitUp method is called the Panels parent is rolled up, the Panel that envoked the RollitUp method remains unchanged.


ResetIni

Syntax: TPowerPanel.ResetIni(IniFileName: string);

Use this method to reset the INI file setting for this panel to the design time values.

This can be performed on multiple panels at design time by using the globalattributes component editor.


EraseIni

Syntax: TPowerPanel.EraseIni(IniFileName: string);

Use this method to erase the INI file setting for this panel.

This can be performed on multiple panels by using the globalattributes component editor.


Installing

Installation Notes:

This package can be used with either Delphi 1.00 or Delphi 2.00. The only difference is registration unit you use. If you are installing under Delphi 1.xx use the ppreg16.pas/dcu. If you are installing under Delphi 2.00 use the ppreg.pas/dcu.

The reason for the different units is 16bit/32bit systems use a different resource file format.

If you are installing over a previous version of PowerPanel, and you have trouble compiling, you may want to try deleting any dcu files associated with PowerPanel and then reinstall.

Unregistered users will have to choose the dcu file.

To install these components, do the following:

•	Store all of the files in a directory on your hard drive.

•	From the Delphi IDE, choose Options|Install Components.

•	Click the add button.

•	Click the Browse button and find the directory where The PowerPanel files were copied.

•	Pick the (PPReg.dcu or PPReg.pas(32bit version)) or(PPReg16.dcu or Ppreg16.pas(16bit version)).

After these steps, you will find a new page on your tool pallet called PowerPanels. Dive right in or take a look at the PPDemo.dpr demonstration program in the install directory.


Disclaimer

At release time, all components were believed to be functioning as described. If you have any problems, you may e-mail me at 72774,2161 for assistance.  PowerPanel is distributed as is and no warranties are implied.


TPowerPanel Component Editor


TPowerPanel Component Editor Page 2


TPowerPanel Component Editor Page 3


TPowerPanel Component Editor Page 4


TGlobalAttributes Component Editor


Reset INI to design time values

Click this button to reset all selected panels to their design time values. This action causes each of the selected PowerPanels ResetIni method to be called.


Erase INI section

Click this button to erase the INI section associated with any of the selected PowerPanels. This action causes each of the selected PowerPanels EraseIni method to be called.


OK

Click to save changes


Cancel

Click to Cancel operation.


Help

Click to display help information.


Copy Global Values

Click to apply the properties of a TGlobalAttributes to the component being edited.


Choose Ini filename

Click this button to open dialog to choose an INI file for logging.


Properties to process

Any property that is checked will be modified when the appy button is clicked. To Select or Deselect all properties, click the right mouse button over any of these check boxes, then a popup menu will appear allowing you to select or deselect all properties.


Apply to Selected Panels

Click to apply all checked properties to all PowerPanels selected in the listbox.


Select all panels

Click to select all PowerPanels in the listbox.


Available PowerPanels

This listbox displays all PowerPanels on the current form that can be manipulated by this component editor. You may select multiple panels by pressing  the control key while clicking items.


Close

Click to close the component editor.


Thank You

Thank you for choosing PowerPanel. Weve tried our best to make sure everything is working as described. If we missed something please let us know via Compuserve at (72774,2161). We will try to reply within 24 hours.

To those of you that are trialing PowerPanel we would also like to express our thanks for considering us.

John Panagia

Strategic Applications


Glossary

AllowBeeps

AllowRollup

Apply to Selected Panels

Available PowerPanels

Borders

Cancel

Choose Ini filename

Close

Components

Contents

Copy Global Values

CursorMoving

CursorSizingEW

CursorSizingNS

Disclaimer

EdgeOffset

Erase INI section

EraseIni

Glossary

GridAlignment

Help

HideChildren

HideSiblings

IniFileName

IniLog

IniPrefix

IniSectionName

Installing

MaxHeight

MaxWidth

Methods

MinHeight

MinWidth

Movable

MovableHorz

MovableVert

MoveColor

MoveParent

OK

Properties

Properties to process

Registration

Reset INI to design time values

ResetIni

RollitUp

Select all panels

Siblings

SizableBottom

SizableLeft

SizableRight

SizableTop

StayVisible

TAttributes Class

TGlobalAttributes

TGlobalAttributes Component Editor

Thank You

TPowerPanel

TPowerPanel Component Editor

TPowerPanel Component Editor Page 2

TPowerPanel Component Editor Page 3

TPowerPanel Component Editor Page 4

TrackPanel

TrackPositions