[solved] OnMouseLeave in a TCheckListBox lazarus / 31-LCL ---------------------------------------------------------------------- andyH · 2022-01-11 18:42 I'm looking at onMouseLeave to see if it solves some some display issues for TCheckListBoxes that I'm using, but I'm doing something stupid. Method is defined as: 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 TBasePanel.MouseLeave(Sender: TObject);begin  writeln('left a box');end; In the constructor for TBasePanel I have: 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 Box1:= TFoxCheckBox.Create(Self);  with Box1 do begin      other stuff...    OnMouseMove:= @DriveHint;      OnMouseLeave:= @MouseLeave;  end;but I'm getting a compile error on @MouseLeave: Quotebasepanel.pas(211,23) Error: Incompatible types: got "" expected "" Not obvious to me what I'm doing wrong? ---------------------------------------------------------------------- howardpc · 2022-01-11 20:41 MouseLeave is a protected method of TControl (and so of TBasePanel). You have a name conflict. {$Mode objfpc} is designed to highlight exactly such ambiguities in your code. Rename your onmouseleave method to something different from an already declared method name. ---------------------------------------------------------------------- andyH · 2022-01-11 22:55 Thanks, changed the name, compiles. I wish all my problems were that easily solved.