Hello,
I've noticed that the AutoSizing-Functions of AdvStringGrid having some problems, when a cell contains a BitButton.
- AutoSizeRow seems to sum text and button height.
- AutoSizeCells also has the same problem like AutoSizeRow, but additional it set the column width very small, to that in some cases values disapear, when (because of the small column width) a word wrap is done, which isn't recognized by calculating the row size.
At the moment my "big" problem is AutoSizeRow. As I don't want to set a manual row size for cells containing a BitButton, I handelt the problem in TAdvStringGrid.SizeToHeight:
// Existing Code:
if (cg.CellType in [ctDataCheckBox, ctCheckbox, ctVirtCheckBox, ctRadioButton]) and (ts <> 0) then
begin
TextH := DefaultRowHeight;
end;
// Added code to avoid wrong height for cells containing a BitButton:
if (cg.CellType in [ctBitButton]) then
begin
TextH := Max(gs, ts);
end;
Maybe you find some time to take a look at the 2 problems. I think it's better when you fix it, then I have to fix it after every update... :-)
Kind regards,
Marian
