From: <ah...@us...> - 2007-12-16 19:55:37
|
Revision: 11623 http://jvcl.svn.sourceforge.net/jvcl/?rev=11623&view=rev Author: ahuser Date: 2007-12-16 11:55:34 -0800 (Sun, 16 Dec 2007) Log Message: ----------- Mantis #4258: TJvPanel doesn't display a custom cursor (Mantis #4258) Modified Paths: -------------- trunk/jvcl/run/JvPanel.pas Modified: trunk/jvcl/run/JvPanel.pas =================================================================== --- trunk/jvcl/run/JvPanel.pas 2007-12-16 19:30:42 UTC (rev 11622) +++ trunk/jvcl/run/JvPanel.pas 2007-12-16 19:55:34 UTC (rev 11623) @@ -123,6 +123,7 @@ FHotTrackFont: TFont; FHotTrackFontOptions: TJvTrackFontOptions; FHotTrackOptions: TJvHotTrackOptions; + FLastScreenCursor: TCursor; function GetHeight: Integer; procedure SetHeight(Value: Integer); function GetWidth: Integer; @@ -908,6 +909,7 @@ FDragging := True; FLastPos := Point(X, Y); MouseCapture := True; + FLastScreenCursor := Screen.Cursor; Screen.Cursor := crSizeNWSE; end else @@ -936,10 +938,14 @@ end else inherited MouseMove(Shift, X, Y); - if Sizeable and ((Width - X) < 12) and ((Height - Y) < 12) then - Cursor := crSizeNWSE - else - Cursor := crDefault; + if Sizeable then + begin + if ((Width - X) < 12) and ((Height - Y) < 12) then + Screen.Cursor := crSizeNWSE + else + if Screen.Cursor = crSizeNWSE then + Screen.Cursor := FLastScreenCursor; + end; end; procedure TJvCustomArrangePanel.MouseUp(Button: TMouseButton; Shift: TShiftState; @@ -949,7 +955,8 @@ begin FDragging := False; MouseCapture := False; - Screen.Cursor := crDefault; + if Screen.Cursor = crSizeNWSE then + Screen.Cursor := FLastScreenCursor; Refresh; end else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |