lcl: publish TPageControl.MultiLine property and map it to TCustomNotebook.Options nboMultiLine

git-svn-id: trunk@25507 -
This commit is contained in:
paul 2010-05-19 08:40:32 +00:00
parent 32ae8008b2
commit 415884606c
3 changed files with 17 additions and 2 deletions

View File

@ -315,7 +315,7 @@ type
property Font;
//property HotTrack;
property Images;
//property MultiLine;
property MultiLine;
//property OwnerDraw;
//property ParentBiDiMode;
property ParentFont;

View File

@ -158,6 +158,7 @@ type
procedure DoImageListChange(Sender: TObject);
function GetActivePage: String;
function GetActivePageComponent: TCustomPage;
function GetMultiLine: Boolean;
function GetPage(AIndex: Integer): TCustomPage;
function GetPageCount : integer;
function GetPageIndex: Integer;
@ -166,6 +167,7 @@ type
function IsStoredActivePage: boolean;
procedure AddRemovePageHandle(APage: TCustomPage);
procedure MoveTab(Sender: TObject; NewIndex: Integer);
procedure SetMultiLine(const AValue: Boolean);
procedure WSMovePage(APage: TCustomPage; NewIndex: Integer);
procedure PageRemoved(Index: Integer);
procedure RemovePage(Index: Integer);
@ -212,9 +214,9 @@ type
function GetMinimumTabHeight: integer; virtual;
function GetCapabilities: TNoteBookCapabilities; virtual;
public
//property MultiLine: boolean read fMultiLine write SetMultiLine default false;
procedure DoCloseTabClicked(APage: TCustomPage); virtual;
property Images: TImageList read FImages write SetImages;
property MultiLine: Boolean read GetMultiLine write SetMultiLine default False;
property OnChanging: TTabChangingEvent read FOnChanging write FOnChanging;
property OnCloseTabClicked: TNotifyEvent read FOnCloseTabClicked
write FOnCloseTabClicked;

View File

@ -400,6 +400,11 @@ begin
Result := nil;
end;
function TCustomNotebook.GetMultiLine: Boolean;
begin
Result := nboMultiLine in Options;
end;
{------------------------------------------------------------------------------
TCustomNotebook SetActivePage
------------------------------------------------------------------------------}
@ -533,6 +538,14 @@ begin
Change;
end;
procedure TCustomNotebook.SetMultiLine(const AValue: Boolean);
begin
if AValue then
Options := Options + [nboMultiLine]
else
Options := Options - [nboMultiLine];
end;
{------------------------------------------------------------------------------
function TCustomNotebook.FindVisiblePage(Index: Integer): Integer;