View Issue Details

IDProjectCategoryView StatusLast Update
0002041JEDI VCL00 JVCL Componentspublic2004-08-17 00:07
ReporteranonymousAssigned Touser72 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0002041: TJvNetscapeSplitter completely ignores the value of Cursor property
DescriptionNo matter to what value you set the Cursor property, TJvNetscapeSplitter always uses crVSplit/crHSplit cursors at runtime. For example, I've set the Align property to alBottom, Cursor property to crSizeNS but at runtime the Cursor is set always to crVSplit.
Additional InformationIt seems that crVSplit/crHSplit values are directly hardcoded in the source code...
TagsNo tags attached.

Activities

user72

2004-08-08 23:22

  ~0004970

Last edited: 2004-08-09 02:28

Change TJvCustomNetscapeSplitter.ButtonHitTest to look like this:

function TJvCustomNetscapeSplitter.ButtonHitTest(X, Y: Integer): Boolean;
begin
  // We use FLastKnownButtonRect here so that we don't have to recalculate the
  // button rect with GetButtonRect every time the mouse moved. That would be
  // EXTREMELY inefficient.
  Result := PtInRect(FLastKnownButtonRect, Point(X, Y));
  if Align in [alLeft, alRight] then
  begin
    if (not AllowDrag) or ((Y >= FLastKnownButtonRect.Top) and
      (Y <= FLastKnownButtonRect.Bottom)) then
      Windows.SetCursor(Screen.Cursors[ButtonCursor])
    else
      Windows.SetCursor(Screen.Cursors[Cursor]);
  end
  else
  begin
    if (not AllowDrag) or ((X >= FLastKnownButtonRect.Left) and
      (X <= FLastKnownButtonRect.Right)) then
    begin
      Windows.SetCursor(Screen.Cursors[ButtonCursor])
    end
    else
      Windows.SetCursor(Screen.Cursors[Cursor]);
  end;
end;

That should work OK, except when Cursor = crDefault (if you really want to use crDefault, use crArrow instead as they are the same for splitters).

edited on: 08-09-04 02:28

ivobauer

2004-08-10 02:06

reporter   ~0004977

Yep, that did the trick. Replaced the ButtonHitTest method by the fixed version and the cursor works fine for now. You may want to mark this bug as resolved. BTW, I originally reported it but somehow forgot to login as myself. It will not happen anymore!

And thanks for the fix!

user72

2004-08-17 00:07

  ~0005001

Updated in CVS

Issue History

Date Modified Username Field Change
2004-08-08 12:33 anonymous New Issue
2004-08-08 23:22 user72 Note Added: 0004970
2004-08-08 23:22 user72 Status new => feedback
2004-08-09 02:28 user72 Note Edited: 0004970
2004-08-10 02:06 ivobauer Note Added: 0004977
2004-08-17 00:07 user72 Status feedback => resolved
2004-08-17 00:07 user72 Resolution open => fixed
2004-08-17 00:07 user72 Assigned To => user72
2004-08-17 00:07 user72 Note Added: 0005001