Topic: How to display an image when it is highlighted in a row?
Hello, I would just like to ask how to show an image like a preview when it is highlighted in a box.
I tried to make it work so that every time the image is highlighted on the row on frmReceivingmain, Hrdschiefmain, frmEmployee1, frmEmployee2, frmEmployee3 and frmEmployee4 it will show a preview but unfortunately it is not working.
Derek provided me a similar code on one of my previous projects,
procedure frmReceivingmain_TableGrid1_OnKeyUp (Sender: TObject; var Key: Word; Shift, Alt, Ctrl: boolean);
begin
frmReceivingmain.DBImage1.loadfromdatabase('receiving','attachment1', frmReceivingmain.TableGrid1.dbitemid);
end;
procedure frmReceivingmain_TableGrid1_OnClick (Sender: TObject);
begin
frmReceivingmain.DBImage1.loadfromdatabase('receiving','attachment1', frmReceivingmain.TableGrid1.dbitemid);
end;
May I ask what I did wrong here and how can I correct it and apply it to the forms.
Thank you.