Project JEDI - Issue Tracker - JEDI VCL
Viewing Issue Advanced Details
3018 00 JVCL Components major always 2005-06-04 16:58 2005-06-26 06:27
anonymous  
remkobonte  
normal  
resolved 3.00  
fixed  
none    
none 3.10  
0003018: Wrong images in JvDocking TabHost
To reproduce

Create two dock forms with different icons.
Using the .NET Style dock them in a tab host programmatically e.g.

   ManualTabDock(DockServer.BottomDockPanel, CallStackWindow, VariablesWindow);

The images on the tabs will be the same on both tabs. If you save and restore the dock layout the problem no longer exists.
Suggested Solution:

In procedure TJvDockVIDTabPageControl.DockDrop replace two lines as follows:

procedure TJvDockVIDTabPageControl.DockDrop(Source: TDragDockObject;
  X, Y: Integer);
var
  Index: Integer;
begin
  inherited DockDrop(Source, X, Y);
  FPanel.SelectSheet := nil;
  ParentForm.Caption := ActivePage.Caption;
  if Source.Control is TCustomForm then
  begin
    if Source.Control.Visible and (Source.Control.Parent is TJvDockTabSheet) then
      ActivePage := TJvDockTabSheet(Source.Control.Parent);
    if FTabImageList <> nil then
    begin
      Index := FTabImageList.AddIcon(TForm(Source.Control).Icon);
      //if (Index <> -1) and (ActivePage <> nil) then
      // ActivePage.ImageIndex := Index;
      //KV above two lines replaced with the following two
      if (Index <> -1) and (Source.Control.Parent is TJvDockTabSheet) then
        TJvDockTabSheet(Source.Control.Parent).ImageIndex := Index;
    end;
  end;
end;


Issue History
2005-06-04 16:58 anonymous New Issue
2005-06-05 14:14 remkobonte Status new => assigned
2005-06-05 14:14 remkobonte Assigned To => remkobonte
2005-06-26 06:27 remkobonte Status assigned => resolved
2005-06-26 06:27 remkobonte Resolution open => fixed
2005-06-26 06:27 remkobonte Note Added: 0007494

Notes
(0007494)
remkobonte   
2005-06-26 06:27   
Resolved in

Rev 1.23 of JvDockVIDVCStyle.pas,
Rev 1.41 of JvDockVIDStyle.pas.