Overview
|
The MCTabset component is a descendant of Delphi standard TTabSet.
It provides the following new usefull features:
- Rename tabs inplace
- Change tabs order using mouse drag'n'drop
To rename a tab user can either:
- Click and hold mouse pointer for about a second over the tab
- Hold Ctrl key and then click a tab by mouse
- Use an application-provided context menu
User can type a new tab name and press 'Enter' to confirm changes.
Or, abandon changes by pressing 'Esc' or clicking mouse outside of the editor.
To change the Tab Order, user can simply drag any tab by mouse to a new position.
Component displays a target indicator (a colored triangle) during the drag'n'drop process.
TMCTabset Reference
See the Demo Project for examples on use.
|
DOWNLOAD DEMO (220KB) |
|
Includes a demo project source and its executable. The component source is available on purchase.
|
GET SOURCE CODE NOW! |
|
We use Share*it! service provider for secure payments processing.
You will receive a Download Link instantly right after you have made your order!
|
|
Properties
property RenameTimeout: Cardinal;
A timeout (in milliseconds) before the tab name editor will be displayed (when user click and hold a mouse over the tab).
The property is Read/Write. Its default value is 700 ms.
Methods
procedure ShowEditor(Index: Integer);
Shows an inplace editor for the tab of a given Index.
Remarks
An application can provide a context menu with 'Rename' command for the TabSet control.
Its event handler can be as follows:
// ts: TMCTabset
// pmTabs: TPopupMenu
// pmTabsRename: TMenuItem
procedure TForm1.pmTabsRenameClick(Sender: TObject);
// Activates the inplace editor for the target tab
begin
ts.ShowEditor(ts.TabIndex);
end;
Installation
This component should be installed into the Delphi Component Palette.
Use the component registration unit 'mcTabsReg.pas' for this purpose.
Example registration for Delphi 7:
- From main Delphi menu select 'Component', 'Install Component...'. Dialog window will appear.
- Browse 'Unit File Name' field to the location of mcTabsReg.pas file.
- Press 'OK' to compile the component and register it in Delphi Component Palette.
|
|