You are not logged in.
Pages: 1
i use drawgrid autosize column width, but it work terrible, maybe I do not see how you can control the functions they.
small rewrite source mormot.pas from (https://www.dropbox.com/s/iwf6npz0lufle … column.JPG)
for R := 1 to RowCount do // sum all lengths by field
for F := 0 to FieldCount-1 do begin
case fFieldType[F].ContentType of
sftInteger, sftBlob, sftBlobCustom, sftUTF8Custom, sftRecord,
sftID, sftSet, sftCurrency:
inc(aResult[F],8);
else inc(aResult[F],Utf8FirstLineToUnicodeLength(U^));
end;
inc(U); // points to next value
end;
to
var nullfield: integer;
for R := 1 to RowCount do // sum all lengths by field
for F := 0 to FieldCount-1 do begin
case fFieldType[F].ContentType of
sftDateTime: inc(aResult[F],8)
else begin
nullfield := Utf8FirstLineToUnicodeLength(U^);
if nullfield = 0 then nullfield := 8;
inc(aResult[F],nullfield + 1);
end;
end;
inc(U); // points to next value
end;
and see more better i think (https://www.dropbox.com/s/xmnveo759oskn … column.JPG)
Offline
problem see on last 3 column, he have data not in each row and standart algoritm compress column. fix normalize size column
Offline
yes at the moment, in the six months were no complaints.
but I think it is not the best option, because know only superficially framework
Offline
Pages: 1