AdvDBFilterPanel footer buttons size.

Hi, is it possible to resize the Apply filter, Clear Filter and Restore Filter buttons in a AdvDBFilterPanel?
The font size is very small, I have seen that I can make it grow if I modify the font size of his parent control, but then the text comes out of the button.

On the other hand, I have done tests putting a TZReadOnlyQuery of a DataModule as a datasource of the AdvDBFilterPanel and when destroying the DataModule, it gives me an error: 'Cannot open a dataset when the componentstate is dsDestroying'. It is as if the AdvDBFilterPanel will try to open the query. I have solved it by resetting the filter before closing the Form, which destroys the DataModule before closing.

You can access the buttons with:
AdvDBFilterPanel.Footer*Button: TButton properties and customize font & size from there.

We have applied an improvement for handling destroying the datamodule. Next update will have this improvement.

1 Like

I got it, it gave me problems because I was doing tests linking fields like BLOB SUB_TYPE 0 and BLOB SUB_TYPE 1 with values ​​inserted from a cell and / or from a TDBAdvRichEditor that got corrupted and produced errors.
As you told me, the correct combination is:

  • BLOB type field (SUB_TYPE = 0, by default in firebird).
  • TAdvRichEditor linked with DBAdvRichEditorRTFIO.
  • Column in the TDBAdvGrid for the BLOB field with editor = EdRichEdit.
    This is how it works, the RTF text is saved by the TAdvRichEditor and it is displayed correctly in the TDBAdvGrid.

** I have had the same problem as with the filter, when destroying the DataModule, an error occurs as the TDBAdvRichEditor tries to reference the DataSet (which no longer exists) in TDBAdvRichEditorRTFIO.EditModified:

procedure TDBAdvRichEditorRTFIO.EditModified (Sender: TObject);
begin
if (FModifying) then
Exit;

if not (FDataLink.DataSet.State in [dsEdit, dsInsert]) then //here gives the error since DataSet = nil
begin
FDataLink.Edit;
FDataLink.Modified;
end
else
begin
FDataLink.Modified;
end;
end;

I have fixed it by modifying the first line:

if (FModifying) or (FDataLink.DataSet = nil) then ...

** While writing the answer it occurred to me to try this:

AdvRichEditor1.Free;
DBAdvRichEditorRTFIO1.Free;

in the FormClose, and thus the error does not occur (if I do it the other way around:

procedure TProyectosF.FormClose(Sender: TObject; var Action: TCloseAction);
begin
AdvRichEditor1.Free;
DBAdvRichEditorRTFIO1.Free; //if i do this first --> #error
inherited;
ProyectosDMF.Destroy;
end;

yes it gives the error)

With this I don't need to add ...or (FDataLink.DataSet = nil)... to your code.

Thanks a lot.

We added this improvement.
It will be included in the next update.

1 Like