Platform: Lazarus 1.8.4 FPC 3.0.4 OS: Windows Server 2016
I'm building a TDBgrid that has about 20 columns. The expected behavior is that the user clicks on cell at row one, col one, and Form1 is spawned and .ShowModal 'd . The user closes Form1. Then the user clicks on cell at row one, col two, and Form2 is created and .ShowModal'd. The grid has a OnPrepareCanvas event, and OnCellClick event.
I've built this and when I click on any of the cells, the form I want is displayed, but the app freezes. The spawned window won't close, it's completely frozen. I did some experimenting and changed ShowModal to just Show, and the behavior then is, the window is barely displayed, for about 2/100th of a second, you can just barely see the outline of the window then it disappears completely. It is not behind the main form, it's just gone.
I suspect there is some processing of the grid's OnPrepareCanvas, or OnCellClick events that "wants" to happen but a modal window is preventing it from completing it's tasks, so the app freezes.
What is the correct way to accomplish the opening of a window (form), using ShowModal (Modal), from a TDBGrid, so that the app won't freeze?
Thanks in advance for any help you can provide.