Hi
I'm about to upgrade from Docking pack 2015 to 2019 - is there anything I should look out for? I do use my own styles that I created using your style editor. I also use the DockPersister to save and load the layout. Looking through the code, there are only a few places I interact with the docking library
procedure TMainForm.MainDockSiteUpdateHotSpots(Sender: TObject;
AZone: TLMDDockZone; var EnabledAreas: TLMDActiveAreas);
begin
//Don't allow users to dock into the center tabs.. to be added later!
if (AZone <> nil) and (AZone.Panel = CenterDockPanel) then
Exclude(EnabledAreas,hsaTabAreas );
end;
When persisting the layout, I call this first to ensure we persist with the first tab selected (better user experience when starting up) :
procedure EnsureFirstTabsSelected(const AZone: TLMDDockZone);
var
iZoneIdx: Integer;
begin
for iZoneIdx := 0 to AZone.ZoneCount - 1 do
begin
case AZone.Zones[iZoneIdx].Kind of
zkTabs :
begin
if AZone.Zones[iZoneIdx].ZoneCount > 0 then
AZone.Zones[iZoneIdx].SelectedPage := AZone.Zones[iZoneIdx].Zones[0];
end;
end;
//Recurse down the tree.
EnsureFirstTabsSelected(AZone.Zones[iZoneIdx]);
end;
end;
//By default select all the first tabs in each docked tab control set.
EnsureFirstTabsSelected(MainDockSite.RootZone);
DockPersister.SaveToFile(FDefaultLayoutFileName);
I do also write to the persisted layout with the OnWriteAppInfo event.
I am upgrading from XE7 to 10.3.2 and do use vcl styles, I don't think the 2015 docking pack had support for them, so that might be an issue?
FWIW, this has been in production now for years with thousands of users using FinalBuilder 8 and I can't remember the last time I had an issue that wasn't user induced (and I have a reset dock layout item on the view menu for those situations).
Thanks
Vincent
Comments