This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.
Floating dock panels don't appear in panel count
When closing my program I create a list of open files so they can be reloaded on restart.
However, when there are floating document panels they don't appear in the panels list.
This is my code for listing the open files:
function TfmIDEMain.ListOpenFiles(FileList: TStrings): integer;
Var idx: Integer;
pnl: TLMDDockPanel;
PageType: TIDEPageType;
pInfo: TPageInfo;
begin
for idx := 0 to dsMain.PanelCount -1 do begin
pnl := dsMain.Panels[idx];
if pnl.ClientKind <> dkDocument then
Continue;
PageType := TIDEPageType(Pnl.Tag);
case PageType of
ptEditor: pInfo := TfmEditor(pnl.Controls[0]).PageInfo;///.FileName;
ptPDF: pInfo := TfmPDFPage(pnl.Controls[0]).PageInfo;//.FileName;
end;
if (Length(pInfo.FileName) > 0) and (Not AnsiContainsText(pInfo.Filename, 'untitled')) then
FileList.AddObject(pInfo.Filename, pointer(pInfo.Modified));
end;
Result := FileList.Count;
end;
As you can see I run through all the panels and if they are document panels save their filename.
How can I include floating panels in this list? I don't need their state because they will be reloaded as docked tabs on restarting.

Comments