LCL: tdbnavigator: reduced autosize overhead

git-svn-id: trunk@25288 -
This commit is contained in:
mattias 2010-05-10 08:40:00 +00:00
parent e2a8f33ce7
commit 9f08a628a9

View File

@ -224,6 +224,7 @@ begin
exit;
end;
DisableAlign;
FUpdateButtonsNeeded:=false;
ButtonCount:=VisibleButtonCount;
if Direction=nbdHorizontal then
@ -263,6 +264,9 @@ begin
CurButton.NavStyle:=CurButton.NavStyle+[nsAllowTimer];
CurButton.LoadGlyphFromLazarusResource(DBNavButtonResourceName[CurButtonType]);
CurButton.NumGlyphs:=1;
CurButton.Parent:=Self;
CurButton.OnClick:=@ButtonClickHandler;
CurButton.ControlStyle := CurButton.ControlStyle + [csNoDesignSelectable];
end else
CurButton:=Buttons[CurButtonType];
@ -271,15 +275,13 @@ begin
CurButton.Index:=CurButtonType;
CurButton.SetBounds(X,Y,W,H);
CurButton.Visible:=CurButtonType in FVisibleButtons;
CurButton.OnClick:=@ButtonClickHandler;
CurButton.Parent:=Self;
CurButton.ControlStyle := CurButton.ControlStyle + [csNoDesignSelectable];
if CurButton.Visible then
begin
inc(ButtonNumber);
ButtonStartPos:=ButtonEndPos;
end;
end;
EnableAlign;
ActiveChanged;
end;