mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 16:39:15 +02:00
LCL: TabControl forward style
git-svn-id: trunk@42560 -
This commit is contained in:
parent
aae0ab1f7b
commit
ddb0e30cb0
@ -347,6 +347,7 @@ type
|
||||
procedure AddRemovePageHandle(APage: TCustomPage);
|
||||
procedure MoveTab(Sender: TObject; NewIndex: Integer);
|
||||
procedure SetMultiLine(const AValue: Boolean);
|
||||
procedure SetStyle(AValue: TTabStyle); virtual;
|
||||
procedure WSMovePage(APage: TCustomPage; NewIndex: Integer);
|
||||
procedure PageRemoved(Index: Integer);
|
||||
procedure SetActivePage(const Value: String);
|
||||
@ -393,7 +394,7 @@ type
|
||||
property OwnerDraw: Boolean read FOwnerDraw write FOwnerDraw default False;
|
||||
property RaggedRight: Boolean read FRaggedRight write FRaggedRight default False;
|
||||
property ScrollOpposite: Boolean read FScrollOpposite write FScrollOpposite default False;
|
||||
property Style: TTabStyle read FStyle write FStyle default tsTabs;
|
||||
property Style: TTabStyle read FStyle write SetStyle default tsTabs;
|
||||
property Tabs: TStrings read FAccess write SetPages;
|
||||
property TabHeight: Smallint read FTabHeight write FTabHeight default 0;
|
||||
property TabIndex: Integer read FPageIndex write SetPageIndex default -1;
|
||||
@ -654,6 +655,8 @@ type
|
||||
private
|
||||
FNoteBook: TCustomTabControl{%H-};
|
||||
FInHandleCreated: Boolean;
|
||||
function GetStyle: TTabStyle;
|
||||
procedure SetStyle(AValue: TTabStyle);
|
||||
protected
|
||||
function Get(Index: Integer): string; override;
|
||||
function GetCount: Integer; override;
|
||||
@ -684,6 +687,7 @@ type
|
||||
procedure TabControlBoundsChange; override;
|
||||
function IndexOfTabAt(X, Y: Integer): Integer; override;
|
||||
property TabPosition: TTabPosition read GetTabPosition write SetTabPosition;
|
||||
property Style: TTabStyle read GetStyle write SetStyle;
|
||||
public
|
||||
property NoteBook: TCustomTabControl read FNoteBook;
|
||||
end;
|
||||
@ -719,7 +723,7 @@ type
|
||||
procedure SetOwnerDraw(const AValue: Boolean);
|
||||
procedure SetRaggedRight(const AValue: Boolean);
|
||||
procedure SetScrollOpposite(const AValue: Boolean);
|
||||
procedure SetStyle(const AValue: TTabStyle);
|
||||
procedure SetStyle(AValue: TTabStyle); override;
|
||||
procedure SetTabHeight(const AValue: Smallint);
|
||||
procedure SetTabPosition(AValue: TTabPosition); override;
|
||||
procedure SetTabs(const AValue: TStrings);
|
||||
|
@ -626,6 +626,12 @@ begin
|
||||
Options := Options - [nboMultiLine];
|
||||
end;
|
||||
|
||||
procedure TCustomTabControl.SetStyle(AValue: TTabStyle);
|
||||
begin
|
||||
if FStyle = AValue then Exit;
|
||||
FStyle := AValue;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
function TCustomTabControl.FindVisiblePage(Index: Integer): Integer;
|
||||
|
||||
|
@ -187,6 +187,17 @@ begin
|
||||
TabControlBoundsChange;
|
||||
end;
|
||||
|
||||
procedure TTabControlNoteBookStrings.SetStyle(AValue: TTabStyle);
|
||||
begin
|
||||
FNoteBook.Style := AValue;
|
||||
TabControlBoundsChange;
|
||||
end;
|
||||
|
||||
function TTabControlNoteBookStrings.GetStyle: TTabStyle;
|
||||
begin
|
||||
Result := FNoteBook.Style;
|
||||
end;
|
||||
|
||||
function TTabControlNoteBookStrings.Get(Index: Integer): string;
|
||||
begin
|
||||
Result:=FNoteBook.Pages[Index];
|
||||
@ -453,11 +464,12 @@ begin
|
||||
TTabControlStrings(FTabs).ScrollOpposite:=AValue;
|
||||
end;
|
||||
|
||||
procedure TTabControl.SetStyle(const AValue: TTabStyle);
|
||||
procedure TTabControl.SetStyle(AValue: TTabStyle);
|
||||
begin
|
||||
inherited SetStyle(AValue);
|
||||
if FStyle=AValue then exit;
|
||||
FStyle:=AValue;
|
||||
// ToDo
|
||||
TTabControlNoteBookStrings(FTabs).Style := AValue;
|
||||
end;
|
||||
|
||||
procedure TTabControl.SetTabHeight(const AValue: Smallint);
|
||||
|
Loading…
Reference in New Issue
Block a user