Thanks, Nigel! That works perfectly for a single image.
I'm not quite sure about multiple images, though.
I have two lists, one of files to rotate and one of their grid indices. When I use the following code with multiple images selected, the grid only updates the last one on the list.
for i := 0 to slFilesToRotate.Count-1 do
begin
if (TMenuItem(Sender).Tag = 0) then
RotateThisJPeg270 (slFilesToRotate[i])
else
RotateThisJPeg (slFilesToRotate[i]);
x := StrToInt(slRotatedFileIndexes[i]);
imgGrid.UpdateImage(x);
end;
When I embed the above code between imgGrid.LockUpdate and imgGrid.UnlockUpdate, the grid temporarily blanks out. Even though it works, it's not very pretty.
Any ideas as to how I can improve this?
Thanks!