I wish to show a very simple graph of historic data only under certain conditions.
Under 'normal' running the project does not need to show some data but when [Rates] change then the size of the [Form] can be expanded to reveal extra input fields. This has been working perfectly (and still does as far as data entry is concerned) but I would now like to show a graph of the historic [Rates]. Very simple -- create a TPanel, adjust the data points to fit and plot with MoveTo & LineTo.
Stepping through I can see that the graph is drawn exactly as I would expect but upon completion, the graph disappears ? - The attached ScreenGrabs show the state (9) at the end of the plot routine and then (9A) at the next [F9].
I tested my logic by writing a small test with just a TPanel and TButton. With the form full size, the display is perfect. When I make the form small - so that only the Button is initially visible - then add the form height change before the plot routine, again the plot shows during a step through but vaishes as soon as the project completes. (attached image SG10)
This led me to check if application.ProcessMessages - placed immediately after the form expansion - might solve the problem - - - it doesn't.
Can anyone explain what I need to do to solve this?