View Issue Details

IDProjectCategoryView StatusLast Update
0004928JEDI VCL00 JVCL Componentspublic2009-09-22 16:46
ReporterdeadcantdanceAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.37 
Target VersionFixed in Version3.39 
Summary0004928: JvLookOutPage, Scrollbars are shown but not needed
DescriptionWhen 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.
Additional InformationHere'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;
TagsNo tags attached.

Activities

obones

2009-09-09 19:38

administrator   ~0016072

Hello,

We would really like to have the zipped sources of a sample application showing this.

2009-09-09 23:05

 

JvLookOut Bug Mantis 4928.zip (340,606 bytes)

deadcantdance

2009-09-09 23:05

reporter   ~0016080

Sample with sources and screenshot attached.

obones

2009-09-22 16:46

administrator   ~0016143

Thanks, this is now fixed in SVN

Issue History

Date Modified Username Field Change
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