I am setting the cell Class type in an FNCGrid to TTMSFNCBitmapGridCell;
I am then traversing the grid after population and then depending on contents of a cell using fncGrid.AddBitmap to set the sell bitmap.
It is appearing in the cell but it is expanding to fill the grid (its an SVG in the FNCBitmapContainer) which event/how do I set size limits on the SVG populating a cell?
Can you send us a sample, because each SVG is different, some of them have no size limit. The event to control the size is OnGetCellProperties. Where you can use ControlStretched, ControlWidth & ControlHeight to control the size.
I cannot see the SVG, but if GIMP is prompting, then the OnGetCellProperties is not going to solve the issue. It is only specifing the Width & Height in which the SVG should be drawn, if there are no built-in limits, then unfortunately the SVG will need to be manually preset to a fixed size. Can you re-attach? If an attachment is not working, please send us the SVG separately via support@tmssoftware.com
I tested this here with the SVG, the code with ControlStretched should work, so no need to change the SVG:
procedure TForm1.TMSFNCGrid1GetCellProperties(Sender: TObject; ACol,
ARow: Integer; Cell: TTMSFNCGridCell);
begin
if Cell is TTMSFNCBitmapGridCell then
begin
(Cell as TTMSFNCBitmapGridCell).ControlStretched := True;
end;
end;