Unit TabControl98

////////////////////////////////////////////////////////////////////////////// TABCONTROL98 // ////////////////////////////////////////////////////////////////////////////// Enhanced TabControl for D2 & D3 // * Image List, Right & Left Tabs, ... // ////////////////////////////////////////////////////////////////////////////// Version 2.14 Beta // Date de création : 08/07/1997 // Date dernière modification : 18/03/1998 // ////////////////////////////////////////////////////////////////////////////// Jean-Luc Mattei // jlucm@club-internet.fr / jlucm@mygale.org // ////////////////////////////////////////////////////////////////////////////// IMPORTANT NOTICE : // // // This program is FreeWare // // Please do not release modified versions of this source code. // If you've made any changes that you think should have been there, // feel free to submit them to me at jlucm@club-internet.fr // ////////////////////////////////////////////////////////////////////////////// REVISIONS : // // 1.10 : * Added CNMeasureItem // * Added image drawing in default drawing // 1.11 : * CommCtrlEx Modified for D2 (thanks to Gerhard Volk) // * TDrawTabCtrlEvent, TMeasureTabCtrlEvent Page parameter changed // from TTabControl to TTabControl98 (thanks to Marcus Monnig) // 1.20 : * CustomTabControl98 allows hiddenproperties // * Some properties modified // * Justification only works with fixed width // * Multiline and Buttons looks bad when set (but ok after) // * DrawTab Procedure modified // 1.60 : * Removed unused properties // * Some declaration modified for D2 compatibility // (thanks to Gerhard Volk - again - for all the tests :-)) // * Unified version number // 1.70 : * Color Property added and OnGetColor Event added // (Changes made by Tomas Tejon) // * Added Multiple Default Drawing // ddMode1 : Default // ddMode2 : Written by Tomas Tejon // ddMode3 : Written by Roger Misteli // 1.80 : * Tab Hint // * Font can be choosen for each tab // 1.95 : * Version number unification with PageControl // * Images are still visible at design time when you change a // "RecreateWindow Property" like Tabcontrol.Color // * OnGetImageIndexEvent added // * OnGetHintEvent added // 1.96 : * ToolTip GPF Bug corrected // 1.97 : * Works with D2 (CM_RECREATEWND replaced by CM_SHOWINGCHANGED) // * Uses ComCtl98.pas for D2 & D3 // 1.98 : * WM_MEASUREITEM is NEVER sent to TabControl !!!! thanks Microsoft // An alternative to this problem is an invalidate in // WMRecreateWnd (but it's not what i want) // Some bugs removed. // 1.99 : * More bugs removed (thanks to Edward Zhuravlov) // 2.00 : * IconJustification properties (thanks to Wayne Niddery) // (RightJustification works only with ddMode1) // 2.01 : * Bug corrected (If you didn't used ImageList there were errors). // Thanks to Adrian Logan and Alper Yazgan. // 2.10 : * Some minor changes (for DBTabControl98) // * Works with or without ImageList // * Hint uses TabText instead of Hint // 2.11 : * OnChange Event occurs only one time now // (thanks to Jérôme Bouvattier) // 2.12 : * Transparent property added // * OnGetTabColor modified to handle different color with PageControl// 2.13 : * TabIndex property is now public (thanks to Carlos Ponce de Leon) // 2.14 : * Tabs property is now public (thanks to Carlos Ponce de Leon) // //////////////////////////////////////////////////////////////////////////////

Classes

TCustomTabControl98 -
TTabControl98 -

Functions

Register -

Types

TDefaultDrawingType
TDrawTabEvent
TGetHintEvent
TGetImageIndexEvent
TGetTabColorEvent
TMeasureTabEvent
TTabDrawStyle
TTabIconJustification
TTabJustification
TTabPosition
TTabStyle
TTabType

Constants

Variables


Functions


procedure Register;


Types


TDefaultDrawingType = (ddNone, ddMode1, ddMode2, ddMode3);

TDrawTabEvent = procedure(Page: TCustomTabControl98; Tab: Integer;
                            const Rect: TRect) of object

TGetHintEvent= function(Page:TCustomTabControl98; Tab:Integer): string of object

TGetImageIndexEvent= function(Page:TCustomTabControl98; Tab:Integer): integer of object

TGetTabColorEvent= procedure(Page:TCustomTabControl98; Tab:Integer;
                            Var TabColor, FontColor: TColor) of object

TMeasureTabEvent = procedure(Page: TCustomTabControl98; Tab: Integer;
                            Var Height, Width: Integer) of object

TTabDrawStyle = (tdDefault, tdOwnerDrawFixed);

TTabIconJustification = (ijLeftIcon, ijRightIcon, ijDefault);

TTabJustification = (tjLeftText, tjCenterText, tjRightText);

TTabPosition = (tpTop, tpBottom, tpLeft, tpRight);
Remove this line if you got a Duplicate ressource error {$R *.DCR
TTabStyle = (tsDefault, tsButtons, tsIE4FlatButtons);

TTabType = (ttDefault, ttOpposite);

Constants


Variables