Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

How to get a dkDocument Panel count

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
  • 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;
  • Thank you this helps.
Sign In or Register to comment.