On Fri, 30 Jun 2017 11:59:56 +0300 Alexey via Lazarus <lazarus@lists.lazarus-ide.org> wrote:
> procedure TCustomTreeView.MouseLeave; > begin > FStates:=FStates-[tvsDblClicked,tvsTripleClicked,tvsQuadClicked, > tvsEditOnMouseUp,tvsSingleSelectOnMouseUp]; > if Assigned(FHintWnd) and FHintWnd.Visible > and not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos)) then > FHintWnd.Hide; > inherited MouseLeave; > end; > > If it is MouseLeave than mouse cannot be in ClientRect, then condittion > PtInRect not needed here. Mouse.CursorPos asks the current state. MouseLeave is called by an event of the message queue, so the mouse or control may have moved in the meantime. Mattias -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus-ide.org http://lists.lazarus-ide.org/listinfo/lazarus