d.bernaert Posted November 29, 2019 Share Posted November 29, 2019 Hello, I now have images on the main form that are displayed in the grid in the FiledImage event of the grid. This works fine when this is a static image with a png loaded in the image (see below) if SameText(UpperCase(AField.FieldName), 'LEFT_VOICEMAIL') then begin DoNotDispose := True; Case AField.AsInteger of 0: OutImage := MainForm.ImageEmpty.Picture.Graphic; 1: OutImage := MainForm.ImageGreen.Picture.Graphic; else OutImage := MainForm.ImageEmpty.Picture.Graphic; End; end; I would like to use an svg image stored on disk if possible. I've tried OutImage.LoadFromFile('images/databasedelete.svg'), but this gives me an access violation. Thx Dominique Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted November 29, 2019 Share Posted November 29, 2019 Hi, You can use FieldImageURL event. This worked for me. Quote Link to comment Share on other sites More sharing options...
kkelchev Posted December 3, 2019 Share Posted December 3, 2019 Hi , The nature of SVG is vector text format like this. <svg width="236" height="120" viewBox="0 0 236 120"> <rect x="14" y="23" width="200" height="50" fill="#55FF55" stroke="black" stroke-width="1" /> </svg> You should forget for Pictures and Graphics for SVG Insted could use OnGetText Event and return SVG content to cell; I often use SVG for column beautification and it works just fine. Quote Link to comment Share on other sites More sharing options...
Phxtecno Posted January 5 Share Posted January 5 Hi kkelchev, can you clarify or give example about "return SVG content to cell" ? Regards Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.