Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006332 [JEDI VCL] 00 JVCL Components major always 2014-10-02 10:01 2015-01-19 16:00
Reporter lstauber View Status public  
Assigned To
Priority normal Resolution open  
Status acknowledged   Product Version Daily / GIT
Summary 0006332: Jvrollout realigns controls on collapse/expand
Description create a rollout and place 2 panels with Align=alTop into it (panel1 lies now on the top of the panel2). if you start this application, collapse this rollout and expand it again, the panels are switched, the panel1 lies now below the panel2.
Additional Information bug in the (relatively new) method CheckVisibility. The alignment must be disabled during the visibility setting task. 4 added lines are commented.


procedure TJvCustomRollOut.CheckChildVisibility;
  procedure GetChildVisibility;
    I: Integer;
    if FChildControlVisibility = nil then
      FChildControlVisibility := TStringList.Create;
      FChildControlVisibility.Sorted := True;
    DisableAlign; // !!!!!!!!!!!!!! ADD THIS LINE !!!!!!!!!!!!!!
    for I := 0 to ControlCount - 1 do
      if (Controls[I] is TWinControl) and (TWinControl(Controls[I]).Visible) then
        FChildControlVisibility.AddObject(Controls[I].Name, Controls[I]);
        TWinControl(Controls[I]).Visible := False;
    EnableAlign; // !!!!!!!!!!!!!! ADD THIS LINE !!!!!!!!!!!!!!

  procedure SetChildVisibility;
    I: Integer;
    if FChildControlVisibility <> nil then
      DisableAlign; // !!!!!!!!!!!!!! ADD THIS LINE !!!!!!!!!!!!!!
      for I := 0 to FChildControlVisibility.Count - 1 do
        if FindChildControl(FChildControlVisibility[I]) <> nil then
          TWinControl(FChildControlVisibility.Objects[I]).Visible := True;
      EnableAlign; // !!!!!!!!!!!!!! ADD THIS LINE !!!!!!!!!!!!!!
  if csDesigning in ComponentState then

  if Collapsed then

This change could also bring some performance.
You can naturally also use try...finally :)

notice: I also do not understand, why the code only works with TWinControl and not with all TControls - perhaps from the old, removed method, that only worked with tabstops?!
Tags No tags attached.
Attached Files zip file icon rollout content [^] (4,859 bytes) 2014-12-05 11:38

- Relationships

-  Notes
obones (administrator)
2014-12-04 15:00

Please provide the zipped sources of a sample application showing this.
lstauber (reporter)
2014-12-05 11:40

zipped sources uploaded

- Issue History
Date Modified Username Field Change
2014-10-02 10:01 lstauber New Issue
2014-12-04 15:00 obones Note Added: 0021079
2014-12-04 15:00 obones Status new => feedback
2014-12-05 11:38 lstauber File Added: rollout content
2014-12-05 11:40 lstauber Note Added: 0021130
2015-01-19 16:00 obones Status feedback => acknowledged

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker