OMultiPanel - the ultimate TSplitter replacement for Delphi & Lazarus
Latest Version
1.3 (2013/09/02)Basic info
OMultiPanel is a TSplitter replacement that allows you to split windows percentually. It can also be understood as a TGridPanel replacement with the ability to resize the cells with mouse (and the limitation of 1 row or column).Features
- Easy to use - just place controls into a TOMultiPanel container.
- Easy to customize - the width, color and the whole paint procedure of splitters can be defined for every TOMultiPanel separately or application-wide.
- Unlimited number of controls can be organized in one OMultiPanel in a row or a column. You can place an OMultiPanel into another OMultiPanel and so build complex grid designs.
- ParentBackground support: the splitters can be transparent (OMultiPanel can render parent background - e.g. the gradient of Windows XP TabSheet).
- Supported Delphi versions: Delphi 6 - Delphi XE4 VCL (32+64 bit).
- Supported Lazarus versions: Lazarus 1.0.8 Win32/Win64/Linux/Mac OSX
Screenshots
Video
Installation
- Add the directory with OMultiPanel.pas to Delphi library directory.
- Install package\OMultiPanel_Design.dpk
License
OMultiPanel is licensed under MPL 1.1/GPL 3/LGPL 3 tri-license.
MPL: http://www.mozilla.org/MPL/1.1/
GPL: http://www.gnu.org/licenses/gpl-3.0.html
LGPL: http://www.gnu.org/licenses/lgpl-3.0.html
Change log
OMULTIPANEL RELEASE INFORMATION =============================== Version 1.2 (2013-04-16) - Lazarus support (Win32, Win64, Linux, Mac OSX) - Delphi 6 support - Save configuration to INI (SavePositionsToIniFile, LoadPositionsFromIniFile) Version 1.1 (2013-03-23) - License changed to MPL/GPL/LGPL. Version 1.1 (2012-10-24) - Delphi XE3 Support - ParentBackground support - Hover property (if you update from 1.0, please change your TOnPaintSizingBar and TOnPaintSizingBarMethod event handlers according to the help). Version 1.0 (2012-08-02) - first public release
Download
Please be sure you check the license information before downloading any of the files below.OMultiPanel with source code
TOMultiPanel
Properties
Name | Type | Description |
---|---|---|
PanelCollection | TOMultiPanelCollection | Panel Collection of TOMultiPanelItem (see TOMultiPanelItem below for more information). |
PanelType | TPanelType |
ptHorizontal - controls will be organized in a row. ptVertical - controls will be organized in a column. |
MinPosition | Double | Minimal panel size in OMultiPanel size (1 = 100%). |
SplitterSize | Integer | Splitter size in pixel. |
SplitterColor | TColor | Splitter color. Use clNone if you want a transparent splitter. |
SplitterHoverColor | TColor | Splitter color when the user moves mouse over it. Use clNone if you want a transparent splitter. |
Events
Name | Type | Description |
---|---|---|
OnSplitterMoved | TNotifyEvent | Fired when user moves a splitter. |
OnPaintSizingBar | TOnPaintSizingBar |
TOnPaintSizingBar = procedure(Sender: TOCustomMultiPanel; aCanvas: TCanvas; aBarRect: TRect; aHover: Boolean) of Object; Use this event to paint splitters of a TOMultiPanel. |
Functions & procedures
procedure LoadPositionsFromRegistry(aReg: TRegIniFile); overload; procedure LoadPositionsFromRegistry(aReg: TRegIniFile; const aSection, aIdent: String); overload; procedure SavePositionsToRegistry(aReg: TRegIniFile); overload; procedure SavePositionsToRegistry(aReg: TRegIniFile; const aSection, aIdent: String); overload; |
---|
Load/Save panel size into registry. If you use LoadPositionsFromRegistry(aReg: TRegIniFile), the aSection and aIdent parameters will be automatically determined from TOMultiPanel owner and name. |
procedure LoadPositionsFromIniFile(aIni: TCustomIniFile); overload; procedure LoadPositionsFromIniFile(aIni: TCustomIniFile const aSection, aIdent: String); overload; procedure SavePositionsToIniFile(aIni: TCustomIniFile); overload; procedure SavePositionsToIniFile(aIni: TCustomIniFile const aSection, aIdent: String); overload; |
Load/Save panel size into an ini file. If you use LoadPositionsFromIniFile(aIni: TCustomIniFile), the aSection and aIdent parameters will be automatically determined from TOMultiPanel owner and name. |
TOMultiPanelItem
Properties
Name | Type | Description |
---|---|---|
Control | TControl | Control in this cell. |
Position | Double | Position of the splitter at the right side / under the control in OMultiPanel size units (1 = 100%). The last panel has always Position = 1. Example: You have 3 cells in your OMultiPanel with the positions 0.333, 0.666 and 1 - the cells have equal size. |
Visible | Boolean | Set this property to show/hide the cell. |
Index | Integer | Index of the cell (0 = first). |
Global variables
Use these variables to define default properties of new created OMultiPanels. The variables should be declared before the first TOMultiPanel was created (e.g. in the initialization section):Name | Type | Description |
---|---|---|
OMP_SplitterColor | TColor | SplitterColor |
OMP_SplitterHoverColor | TColor | SplitterHoverColor |
OMP_SplitterSize | Integer | SplitterSize |
Global method variables
Name | Type | Description |
---|---|---|
OMP_OnPaintSizingBar | TOnPaintSizingBarMethod |
TOnPaintSizingBarMethod = procedure(Sender: TOCustomMultiPanel; aCanvas: TCanvas; aBarRect: TRect; aHover: Boolean); Use a paint procedure to override default painting of all OMultiPanels that have not defined an OnPaintSizingBar event handler. |
Contact me for more information (you can write in czech/english/german/russian):