How can I find instances of a given class that exist?

9 ビュー (過去 30 日間)
Matthew Eicholtz
Matthew Eicholtz 2017 年 8 月 1 日
コメント済み: Hyeokjin Jho 2021 年 2 月 23 日
If I create a figure with several graphics objects,
h = figure;
axes(...);
axes(...);
axes(...);
I can find instances of specific graphics objects using the following command:
a = findobj(h,'Type','axes'); %this will return a 3x1 Axes object
What I would like to do is something similar but for objects of a given class. Suppose I have an app containing a toolpack.desktop.ToolGroup object, which itself contains multiple tabs (toolpack.desktop.ToolTab) and sections (toolpack.desktop.ToolSection). Is there are easy way to access these objects without storing them as properties of the app itself?
That is, I want to do something like:
tabs = findobj('Type','toolpack.desktop.ToolTab'); %to find all of the ToolTabs
(I'm not sure that findobj is the correct function here; I am just showing it for example). Can this be done?
  2 件のコメント
Jai Bhagat
Jai Bhagat 2019 年 3 月 27 日
any solution found?
Hyeokjin Jho
Hyeokjin Jho 2021 年 2 月 23 日
any solution found?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by