Discussions
Sign In
•
Register
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In with LMD account
Sign In with LMD account
Categories
Recent Discussions
Categories
All Categories
1.1K
NG Controls
28
Announcements
60
LMD IDE-Tools
209
LMD ElPack
373
LMD-Tools
414
Feature Requests
38
In this Discussion
Carlo Marangoni
March 2021
Eugene Balabuev (LMD)
March 2021
How to get a dkDocument Panel count
Carlo Marangoni
March 2021
in
LMD-Tools
Vote Up
0
Vote Down
Hi folks;
Could someone direct me or show me how to get a count of all currently opened document panels that are open in the docking control pack.
Thank you.
Comments
2 Comments
sorted by
Votes
Date Added
Eugene Balabuev (LMD)
March 2021
Posts: 0
Accepted Answer
Vote Up
0
Vote Down
You can count them manually by iterating form's child components:
procedure TForm4.Button1Click(Sender: TObject);
var
i: Integer;
cnt: Integer;
begin
cnt := 0;
for i := 0 to ComponentCount- 1 do
begin
if (Components[i] is TLMDDockPanel) and
(TLMDDockPanel(Components[i]).ClientKind = dkDocument) then
Inc(cnt);
end;
end;
Carlo Marangoni
March 2021
Posts: 22
Vote Up
0
Vote Down
Thank you this helps.
Sign In
or
Register
to comment.
Comments