From 649c0ee2418a1f24f604cf8e48cc48dc40aa7757 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Wed, 17 Apr 2024 20:26:42 +0200 Subject: [PATCH] CppKore: add getter for child control count --- src/thirdparty/cppnet/cppkore/Control.cpp | 5 +++++ src/thirdparty/cppnet/cppkore/Control.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/thirdparty/cppnet/cppkore/Control.cpp b/src/thirdparty/cppnet/cppkore/Control.cpp index cb977402..d3ce62e5 100644 --- a/src/thirdparty/cppnet/cppkore/Control.cpp +++ b/src/thirdparty/cppnet/cppkore/Control.cpp @@ -725,6 +725,11 @@ namespace Forms return this->_RTTI; } + uint32_t Control::GetControlCount() + { + return this->_Controls->Count(); + } + Control* Control::FindForm() { auto Cur = this; diff --git a/src/thirdparty/cppnet/cppkore/Control.h b/src/thirdparty/cppnet/cppkore/Control.h index 87ffbda7..978b70c2 100644 --- a/src/thirdparty/cppnet/cppkore/Control.h +++ b/src/thirdparty/cppnet/cppkore/Control.h @@ -209,6 +209,8 @@ namespace Forms HWND GetHandle(); // Returns the type of this control ControlTypes GetType(); + // Returns the number of child controls + uint32_t GetControlCount(); // Retrieves the form that the control is on. Control* FindForm();