minor fix filter bar in rxdbgrid

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@990 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2009-10-28 19:31:30 +00:00
parent 9c6bbd1077
commit 186534c2e0

View File

@ -931,16 +931,28 @@ begin
end;
procedure TRxDBGrid.SetOptionsRx(const AValue: TOptionsRx);
var
OldOpt:TOptionsRx;
begin
if FOptionsRx=AValue then exit;
OldOpt:=FOptionsRx;
FOptionsRx:=AValue;
UseXORFeatures:=rdgXORColSizing in FOptionsRx;
if rdgFilter in FOptionsRx then
UseXORFeatures:=rdgXORColSizing in AValue;
if (rdgFilter in AValue) and not (rdgFilter in OldOpt) then
begin
LayoutChanged;
BeginUpdate;
CalcTitle;
EndUpdate;
end
else
if rdgFilter in OldOpt then
begin
FFilterListEditor.Hide;
LayoutChanged;
BeginUpdate;
CalcTitle;
EndUpdate;
end;
VisualChange;
end;
@ -1083,6 +1095,9 @@ begin
if rdgFilter in OptionsRx then
begin
if Assigned(FFilterListEditor) then
RowHeights[0] := RowHeights[0] + FFilterListEditor.Height
else
RowHeights[0] := RowHeights[0] + DefaultRowHeight;
end;
@ -1119,12 +1134,18 @@ end;
function TRxDBGrid.getFilterRect(bRect: TRect): TRect;
begin
Result := bRect;
if Assigned(FFilterListEditor) then
Result.Top := bRect.Bottom - FFilterListEditor.Height
else
Result.Top := bRect.Bottom - DefaultRowHeight;
end;
function TRxDBGrid.getTitleRect(bRect: TRect): TRect;
begin
Result := bRect;
if Assigned(FFilterListEditor) then
Result.Bottom := bRect.Bottom - FFilterListEditor.Height
else
Result.Bottom := bRect.Bottom - DefaultRowHeight;
end;