procedure TForm1.scSplitView1MouseEnter(Sender: TObject);
begin
if scSplitView1.Opened then
Exit;
scSplitView1.Opened := True;
Label1.Visible := True;
Label2.Visible := True;
end;
procedure TForm1.scSplitView1MouseLeave(Sender: TObject);
var
P: TPoint;
R: TRect;
begin
GetWindowRect(scSplitView1.Handle, R);
GetCursorPos(P);
if PtInRect(R, P) then
exit
else
begin
//这里要先隐藏文字,不然会看到字体向左移动
Label1.Visible := False;
Label2.Visible := False;
scSplitView1.Opened := False;
end;
end;