Posted 23 August 2018, 4:18 am EST
Hello,
My application adds and deletes image files to be displayed in cells. I used a _MouseDown event to delete and add pictures. I noticed that my spreadsheet display was displaying the original image and not the added image. I got the spreadsheet to properly display the added image after I included gcSpreadSheet1.Invalidate() at the end of the event handler. I also need an _EditEnd event to handle user inputs to the cells and this event handler also removes and adds images based on the input. I also noticed that the spreadsheet was not being updated so I added the Invalidate() line at the end of this event. This addition causes a StackOverflowException due to the _EditEnd event being called in a loop. If I comment out the the AddPicture and the Invalidate() lines the spreadsheet does show the image being removed. I have also tried adding the autorefresh = False/SuspendEvent at the beginning of the event handler and ResumeEvent()/autorefresh = True at the end and the Spreadsheet still shows the original image.
Thanks for your help,
Luis