mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 17:00:57 +02:00
LCL: fix TabControl TabPosition and MultiLine issue #0020858
git-svn-id: trunk@42549 -
This commit is contained in:
parent
fb2bcdf0bd
commit
ea395a6fa7
@ -659,6 +659,7 @@ type
|
||||
function GetCount: Integer; override;
|
||||
function GetObject(Index: Integer): TObject; override;
|
||||
function GetTabIndex: integer; override;
|
||||
function GetTabPosition: TTabPosition;
|
||||
procedure NBChanging(Sender: TObject; var AllowChange: Boolean); virtual;
|
||||
procedure NBGetImageIndex(Sender: TObject; TheTabIndex: Integer;
|
||||
var ImageIndex: Integer); virtual;
|
||||
@ -667,9 +668,11 @@ type
|
||||
procedure Put(Index: Integer; const S: string); override;
|
||||
procedure PutObject(Index: Integer; AObject: TObject); override;
|
||||
procedure SetImages(const AValue: TCustomImageList); override;
|
||||
procedure SetMultiLine(const AValue: Boolean); override;
|
||||
procedure SetTabIndex(const AValue: integer); override;
|
||||
procedure SetUpdateState(Updating: Boolean); override;
|
||||
procedure SetTabHeight(const AValue: Smallint); override;
|
||||
procedure SetTabPosition(AValue: TTabPosition);
|
||||
procedure SetTabWidth(const AValue: Smallint); override;
|
||||
public
|
||||
constructor Create(TheTabControl: TTabControl); override;
|
||||
@ -680,6 +683,7 @@ type
|
||||
function GetSize: integer; override;
|
||||
procedure TabControlBoundsChange; override;
|
||||
function IndexOfTabAt(X, Y: Integer): Integer; override;
|
||||
property TabPosition: TTabPosition read GetTabPosition write SetTabPosition;
|
||||
public
|
||||
property NoteBook: TCustomTabControl read FNoteBook;
|
||||
end;
|
||||
|
@ -176,6 +176,17 @@ begin
|
||||
FInHandleCreated := False;
|
||||
end;
|
||||
|
||||
function TTabControlNoteBookStrings.GetTabPosition: TTabPosition;
|
||||
begin
|
||||
Result := FNoteBook.TabPosition;
|
||||
end;
|
||||
|
||||
procedure TTabControlNoteBookStrings.SetTabPosition(AValue: TTabPosition);
|
||||
begin
|
||||
FNoteBook.TabPosition := AValue;
|
||||
TabControlBoundsChange;
|
||||
end;
|
||||
|
||||
function TTabControlNoteBookStrings.Get(Index: Integer): string;
|
||||
begin
|
||||
Result:=FNoteBook.Pages[Index];
|
||||
@ -209,6 +220,13 @@ begin
|
||||
FNoteBook.Images:=nil;
|
||||
end;
|
||||
|
||||
procedure TTabControlNoteBookStrings.SetMultiLine(const AValue: Boolean);
|
||||
begin
|
||||
inherited SetMultiLine(AValue);
|
||||
FNoteBook.MultiLine := AValue;
|
||||
TabControlBoundsChange;
|
||||
end;
|
||||
|
||||
procedure TTabControlNoteBookStrings.SetUpdateState(Updating: Boolean);
|
||||
begin
|
||||
if Updating then
|
||||
@ -449,7 +467,7 @@ procedure TTabControl.SetTabPosition(const AValue: TTabPosition);
|
||||
begin
|
||||
if FTabPosition=AValue then exit;
|
||||
FTabPosition:=AValue;
|
||||
TTabControlStrings(FTabs).TabControlBoundsChange;
|
||||
TTabControlNoteBookStrings(FTabs).TabPosition := AValue;
|
||||
ReAlign;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user