Project JEDI - Issue Tracker - JEDI VCL
Viewing Issue Advanced Details
4928 00 JVCL Components minor always 2009-09-07 18:51 2009-09-22 16:46
deadcantdance  
obones  
normal  
resolved 3.37  
fixed  
none    
none 3.39  
0004928: JvLookOutPage, Scrollbars are shown but not needed
When a component, e.g. JvGradient, is used as background for JvLookOutPage and Align is alClient, the up-arrow is shown, but the control is in client-area.
Here's the workaround:

procedure TJvLookOutPage.CalcArrows;
var
  I: Integer;
  R: TRect;
  AList: TList;
begin
  if Assigned(FUpArrow) and Assigned(FDownArrow) then
  begin
    // (rom) needs constants instead of numbers
    if Height < 65 then
    begin
      // FUpArrow.Visible := False;
      // FDownArrow.Visible := False;
      FDownArrow.Top := FUpArrow.Top + 16;
      Exit;
    end;

    R := GetClientRect;
    FUpArrow.SetBounds(R.Right - 23, R.Top + 25, 16, 16);
    FDownArrow.SetBounds(R.Right - 23, R.Bottom - 23, 16, 16);
    AList := TList.Create;
    try
      for I := 0 to ControlCount - 1 do
      begin
        if (Controls[I] = FUpArrow) or (Controls[I] = FDownArrow) or (Controls[I] = FEdit) then
          Continue;

        if not Controls[I].Visible and not (csDesigning in ComponentState) then
          Continue;
////////// WORKAROUND START //////////
        if (Controls[I]).Align=alClient then
          Continue;
////////// WORKAROUND END //////////
        AList.Insert(AList.Count, Controls[I]);
      end;

      if AList.Count = 0 then
        Exit;
      AList.Sort(Compare);
      FDownArrow.Visible := not IsVisible(AList.Items[AList.Count - 1]);
      FUpArrow.Visible := not IsVisible(AList.Items[0]);
    finally
      AList.Free;
    end;
  end;
end;
zip file icon JvLookOut Bug Mantis 4928.zip [^] (340,606 bytes) 2009-09-09 23:05
Issue History
2009-09-07 18:51 deadcantdance New Issue
2009-09-09 19:38 obones Note Added: 0016072
2009-09-09 19:38 obones Status new => feedback
2009-09-09 23:05 deadcantdance File Added: JvLookOut Bug Mantis 4928.zip
2009-09-09 23:05 deadcantdance Note Added: 0016080
2009-09-22 16:46 obones Note Added: 0016143
2009-09-22 16:46 obones Status feedback => resolved
2009-09-22 16:46 obones Fixed in Version => Daily / SVN
2009-09-22 16:46 obones Resolution open => fixed
2009-09-22 16:46 obones Assigned To => obones

Notes
(0016072)
obones   
2009-09-09 19:38   
Hello,

We would really like to have the zipped sources of a sample application showing this.
(0016080)
deadcantdance   
2009-09-09 23:05   
Sample with sources and screenshot attached.
(0016143)
obones   
2009-09-22 16:46   
Thanks, this is now fixed in SVN