View Issue Details

IDProjectCategoryView StatusLast Update
0003989JEDI VCL00 JVCL Componentspublic2007-03-08 15:19
ReporterKiriakosAssigned Toremkobonte 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.20 
Target VersionFixed in Version 
Summary0003989: JvDocking - VSNet Style: Order of tabs is not preserved in autohidden TabHosts
DescriptionTo replicate:
- Use the Advanced Demo setting the style to VSNet.
- Create 4 VSNet Windows and dock them in at TabHost at the bottom of the form.
- Reorder the tabs in the TabHost.
- Minimize (auto hide) the TabHost
- Notice that the order of tabs in the minimized TabHost is not the same as in the original TabHost.

The problem is the following code in procedure TJvDockVSBlock.AddDockControl(Control: TWinControl);


      for I := 0 to PageControl.DockClientCount - 1 do
      begin
        AddPane(PageControl.DockClients[I], PaneWidth);
        TJvDockVSNETTabSheet(PageControl.Pages[I]).OldVisible := PageControl.DockClients[I].Visible;
        if PageControl.Pages[I] <> PageControl.ActivePage then
          PageControl.DockClients[I].Visible := False;
      end;


This code makes the wrong assumption that PageControl.DockClients would be in the same order as PageControl.Pages. This is not the case if we reorder the pages.

To correct the problem replace the code above with the following:

      for I := 0 to PageControl.Count - 1 do
      begin
        if (PageControl.Pages[I].ControlCount > 0) and
          (PageControl.Pages[I].Controls[0] is TCustomForm) then
        begin
          Form := TCustomForm(PageControl.Pages[I].Controls[0]);
          AddPane(Form, PaneWidth);
          TJvDockVSNETTabSheet(PageControl.Pages[I]).OldVisible := Form.Visible;
          if PageControl.Pages[I] <> PageControl.ActivePage then
            Form.Visible := False;
        end;
      end;

You need to add a variable declaration in this method:

  Form : TCustomForm;
TagsNo tags attached.

Activities

remkobonte

2007-03-08 15:19

developer   ~0011299

Okay, thanks for the detailed report and fix.

The fix is in revision 11202.

Issue History

Date Modified Username Field Change
2006-11-06 20:54 Kiriakos New Issue
2007-03-08 14:19 remkobonte Status new => assigned
2007-03-08 14:19 remkobonte Assigned To => remkobonte
2007-03-08 15:19 remkobonte Status assigned => resolved
2007-03-08 15:19 remkobonte Resolution open => fixed
2007-03-08 15:19 remkobonte Note Added: 0011299