You've already forked lazarus-ccr
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:
@ -931,12 +931,24 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxDBGrid.SetOptionsRx(const AValue: TOptionsRx);
|
procedure TRxDBGrid.SetOptionsRx(const AValue: TOptionsRx);
|
||||||
|
var
|
||||||
|
OldOpt:TOptionsRx;
|
||||||
begin
|
begin
|
||||||
if FOptionsRx=AValue then exit;
|
if FOptionsRx=AValue then exit;
|
||||||
|
OldOpt:=FOptionsRx;
|
||||||
FOptionsRx:=AValue;
|
FOptionsRx:=AValue;
|
||||||
UseXORFeatures:=rdgXORColSizing in FOptionsRx;
|
UseXORFeatures:=rdgXORColSizing in AValue;
|
||||||
if rdgFilter in FOptionsRx then
|
if (rdgFilter in AValue) and not (rdgFilter in OldOpt) then
|
||||||
begin
|
begin
|
||||||
|
LayoutChanged;
|
||||||
|
BeginUpdate;
|
||||||
|
CalcTitle;
|
||||||
|
EndUpdate;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if rdgFilter in OldOpt then
|
||||||
|
begin
|
||||||
|
FFilterListEditor.Hide;
|
||||||
LayoutChanged;
|
LayoutChanged;
|
||||||
BeginUpdate;
|
BeginUpdate;
|
||||||
CalcTitle;
|
CalcTitle;
|
||||||
@ -1083,7 +1095,10 @@ begin
|
|||||||
|
|
||||||
if rdgFilter in OptionsRx then
|
if rdgFilter in OptionsRx then
|
||||||
begin
|
begin
|
||||||
RowHeights[0] := RowHeights[0] + DefaultRowHeight;
|
if Assigned(FFilterListEditor) then
|
||||||
|
RowHeights[0] := RowHeights[0] + FFilterListEditor.Height
|
||||||
|
else
|
||||||
|
RowHeights[0] := RowHeights[0] + DefaultRowHeight;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
@ -1119,13 +1134,19 @@ end;
|
|||||||
function TRxDBGrid.getFilterRect(bRect: TRect): TRect;
|
function TRxDBGrid.getFilterRect(bRect: TRect): TRect;
|
||||||
begin
|
begin
|
||||||
Result := bRect;
|
Result := bRect;
|
||||||
Result.Top := bRect.Bottom - DefaultRowHeight;
|
if Assigned(FFilterListEditor) then
|
||||||
|
Result.Top := bRect.Bottom - FFilterListEditor.Height
|
||||||
|
else
|
||||||
|
Result.Top := bRect.Bottom - DefaultRowHeight;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRxDBGrid.getTitleRect(bRect: TRect): TRect;
|
function TRxDBGrid.getTitleRect(bRect: TRect): TRect;
|
||||||
begin
|
begin
|
||||||
Result := bRect;
|
Result := bRect;
|
||||||
Result.Bottom := bRect.Bottom - DefaultRowHeight;
|
if Assigned(FFilterListEditor) then
|
||||||
|
Result.Bottom := bRect.Bottom - FFilterListEditor.Height
|
||||||
|
else
|
||||||
|
Result.Bottom := bRect.Bottom - DefaultRowHeight;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxDBGrid.OutCaptionCellText(aCol, aRow: Integer;const aRect: TRect;
|
procedure TRxDBGrid.OutCaptionCellText(aCol, aRow: Integer;const aRect: TRect;
|
||||||
|
Reference in New Issue
Block a user