OnEnter of frame activates zoom selection in chart lazarus / 55-TAChart ---------------------------------------------------------------------- fpcoder · 2018-10-08 20:35 There is a chart in a frame and the frame has an OnEnter event with a showmessage. When clicking the chart OnEnter triggers ShowMessage, but on dissmissing that dialog a zoom selection in the chart starts. Am I doing something wrong? ---------------------------------------------------------------------- wp · 2018-10-09 08:46 The problem starts when you click into the chart to trigger the ShowMessage. But primarily, the click initiates a zooming process. I don't know exactly what happens when the message is shown, but the chart is still in zooming mode even when the message is closed - that's why that rectangle appears. A way to avoid this is to deactivate zooming in the Object Inspector: Chart1.AllowZoom := false. If you need zooming afterwards you can switch AllowZoom back to true again. But as I found out, in Linux it is not sufficient to do this immediately after the ShowMessage call, instead it must be queued asynchronously: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TfrTest.DoAllowZoom(AData: PtrInt);begin  TChart(AData).AllowZoom := true;end; procedure TfrTest.FrameEnter(Sender: TObject);begin  ShowMessage('Enter');//  Chart1.AllowZoom := true;   // <---- this does not work  Application.QueueAsyncCall(@DoAllowZoom, PtrInt(Chart1));end; Another, even simpler, solution is to turn on the Chart's AutoFocus. (The problem is for me that I don't know why this works.) ---------------------------------------------------------------------- fpcoder · 2018-10-09 21:12 Thanks, QueueAsyncCall did the trick for me under Linux!