View Issue Details

IDProjectCategoryView StatusLast Update
0006152JEDI VCL00 JVCL Componentspublic2014-12-04 16:27
ReporterPedraultAssigned Toobones 
PrioritynormalSeveritytrivialReproducibilityalways
Status resolvedResolutionsuspended 
Product Version3.47 
Target VersionFixed in Version 
Summary0006152: TJvRollOut visibility of TWinControl instead of TControl
DescriptionThe TJvRollOut executes the CheckChildVisibility method every time the control is collapsed or expanded.

In this method, there is a filter applied to the child components which have to be hidden or shown. The only components handled are TWinControl. Since TControl has Visible property too, I think it should be more usefull to use it in this method!
In my case, I've to handle the OnCollapse and OnExpand event to hide/show my component herited from a TCustomControl. It's a little tricky.
Additional Informationrocedure TJvCustomRollOut.CheckChildVisibility;
  procedure GetChildVisibility;
  var
    I: Integer;
  begin
    if FChildControlVisibility = nil then
    begin
      FChildControlVisibility := TStringList.Create;
      FChildControlVisibility.Sorted := True;
    end;

    for I := 0 to ControlCount - 1 do
      if TControl(Controls[I]).Visible then //Controls[I] is a TControl: test is useless
      begin
        FChildControlVisibility.AddObject(Controls[I].Name, Controls[I]);
        Controls[I].Visible := False;
      end;
  end;

  procedure SetChildVisibility;
  var
    I: Integer;
  begin
    if FChildControlVisibility <> nil then
    begin
      for I := 0 to FChildControlVisibility.Count - 1 do
        if FindChildControl(FChildControlVisibility[I]) <> nil then
          TControl(FChildControlVisibility.Objects[I]).Visible := True;
      FreeAndNil(FChildControlVisibility);
    end;
  end;
begin
  if csDesigning in ComponentState then
    Exit;

  if Collapsed then
    GetChildVisibility
  else
    SetChildVisibility;
end;
TagsNo tags attached.

Activities

obones

2013-12-13 10:55

administrator   ~0020729

Please try with the latest JVCL version in GIT (or daily zip) and then send us a zipped file containing the sources of an application showing the issue.

obones

2014-12-04 16:27

administrator   ~0021101

No news, suspending the issue

Issue History

Date Modified Username Field Change
2013-06-18 12:13 Pedrault New Issue
2013-12-13 10:55 obones Note Added: 0020729
2013-12-13 10:55 obones Status new => feedback
2014-12-04 16:27 obones Note Added: 0021101
2014-12-04 16:27 obones Status feedback => resolved
2014-12-04 16:27 obones Resolution open => suspended
2014-12-04 16:27 obones Assigned To => obones