myPanel.get("childComponents") - seems not to work
-
Yes, what do you want to do with them?
-
@d-healey I want to pass the panel to a function, that iterates through the components setting them to a value
-
@Lindon Are the children panels too?
-
HiseSnippet 995.3ocsVEtaaaCDlzwLqVctnEnO.Z9W1.cAxascaHnXt1wYvHMIFyYECXankVh1hMRjBRTswnHX8G626YX.6EqOB6MX6njrEcmhmqAl9kti22ce73w633XoKKIQFivMtXQDCg+TxjEBk+.eJWfFcDBeGxozDEK1NWU+EQzjDlGBi266zJvMpix99qusOMfJbYkpPnmK4trmwC4pRsi6cBOH3XpG6Bdng0Or2HWoXfLPlB7YOhCJh5dIcN6Lp1rZDDd+gdbkLdhhpXIfM8kdKl3KeiH29myS3SCXZgtnIfixUiF3yC7FubulfP35iK246kuyuO4TtGek9xLvcyVvtDgYN.WacJUeMJ08lnzwx.OsCtA5gMnW8b5cOxD2XdjpbEM2tMYj.NblQgztIsxsEU62wjARvBg5fP5kriiAgUHZ+XGmGX+HGmNG1zpoULatsqlJwLg8Sr+oeIS6LYrcaWatvdoilyTOMHXfLLRJ.4j1sZ0oSSq21zxF93y.y01ztUDE7jZkgs5X+YOwt0XpfEzEDfCaEWjxNLG3xPePTZhea2NGZc85weoAcxsGnShLfcPTLWnVFRtGvkCmkJbUbovVJNSpXmKZ2w5sVMrt1x9CWZ1rJWSuWikAAr3JWVW3FuIfsEogSYwOv90zfT1JCgSy0KW1e6JWbyS8FFJEiDb04QrB4xBptUTPgJN6zU9ELDLUkUXcmhBq9oJkTf3fSZPxE5hxnu4EZzMAeR.2iEmA+SHmHjS2Fv2s.LTiLU1WdUF7aSVJtQWTO2EMKbwETcdSi+Vjr+q.rGUQyZjf9gQGo+GtpTjYfrUDKVw0GJ3iXuFZakeuqA4HVxkJYTVpqnTFN3VO5YE0EQOu.Gc0pH+ty6svr82a3dJeDlf+SLB4y3y8UZoeCjv6YDCxVb.UFEz2XFkg89faeFLCcywnhSwxH7xPiH7tS1xHr+VdTarS9Yi379W0KjdkN+nk1tP9eWZTFrd+p4lZRuM3mQgvvnB+j8uoeduoe9ioaxOOiNcUwR1+qUrbsoetrG5eOJ.FHI8RCnp0mRoGGWr.zKZswA5V9hDtZg435OhQWNUN5pxNMaIcuGYLW45WMeqUAeg6F+ey2hGBzjLb1Llqpjr0IG+i65T+OBp78xTXf37SopXtth+rzvIvagbY.SDPQdh9VPMcOvbYmk2JlvDdYB+M7UrXWsLtXwtKWDERcikuvMuIp9oF2JSCvIQ1qrZ.O2CjsW08jPbNvAEBu.5Ett5TwmCbuZLewNf4K2ALObGv7nc.yi2ALe0Nf4q2HF8iOeZpRFleMATLdX1vKLdnP2MKqhD8O7KFOzF
In this example I'm adding the children to an array but you could work on them directly in the loop instead.
-
@d-healey said in myPanel.get("childComponents") - seems not to work:
HiseSnippet 995.3ocsVEtaaaCDlzwLqVctnEnO.Z9W1.cAxascaHnXt1wYvHMIFyYECXankVh1hMRjBRTswnHX8G626YX.6EqOB6MX6njrEcmhmqAl9kti22ce73w633XoKKIQFivMtXQDCg+TxjEBk+.eJWfFcDBeGxozDEK1NWU+EQzjDlGBi266zJvMpix99qusOMfJbYkpPnmK4trmwC4pRsi6cBOH3XpG6Bdng0Or2HWoXfLPlB7YOhCJh5dIcN6Lp1rZDDd+gdbkLdhhpXIfM8kdKl3KeiH29myS3SCXZgtnIfixUiF3yC7FubulfP35iK246kuyuO4TtGek9xLvcyVvtDgYN.WacJUeMJ08lnzwx.OsCtA5gMnW8b5cOxD2XdjpbEM2tMYj.NblQgztIsxsEU62wjARvBg5fP5kriiAgUHZ+XGmGX+HGmNG1zpoULatsqlJwLg8Sr+oeIS6LYrcaWatvdoilyTOMHXfLLRJ.4j1sZ0oSSq21zxF93y.y01ztUDE7jZkgs5X+YOwt0XpfEzEDfCaEWjxNLG3xPePTZhea2NGZc85weoAcxsGnShLfcPTLWnVFRtGvkCmkJbUbovVJNSpXmKZ2w5sVMrt1x9CWZ1rJWSuWikAAr3JWVW3FuIfsEogSYwOv90zfT1JCgSy0KW1e6JWbyS8FFJEiDb04QrB4xBptUTPgJN6zU9ELDLUkUXcmhBq9oJkTf3fSZPxE5hxnu4EZzMAeR.2iEmA+SHmHjS2Fv2s.LTiLU1WdUF7aSVJtQWTO2EMKbwETcdSi+Vjr+q.rGUQyZjf9gQGo+GtpTjYfrUDKVw0GJ3iXuFZakeuqA4HVxkJYTVpqnTFN3VO5YE0EQOu.Gc0pH+ty6svr82a3dJeDlf+SLB4y3y8UZoeCjv6YDCxVb.UFEz2XFkg89faeFLCcywnhSwxH7xPiH7tS1xHr+VdTarS9Yi379W0KjdkN+nk1tP9eWZTFrd+p4lZRuM3mQgvvnB+j8uoeduoe9ioaxOOiNcUwR1+qUrbsoetrG5eOJ.FHI8RCnp0mRoGGWr.zKZswA5V9hDtZg435OhQWNUN5pxNMaIcuGYLW45WMeqUAeg6F+ey2hGBzjLb1Llqpjr0IG+i65T+OBp78xTXf37SopXtth+rzvIvagbY.SDPQdh9VPMcOvbYmk2JlvDdYB+M7UrXWsLtXwtKWDERcikuvMuIp9oF2JSCvIQ1qrZ.O2CjsW08jPbNvAEBu.5Ett5TwmCbuZLewNf4K2ALObGv7nc.yi2ALe0Nf4q2HF8iOeZpRFleMATLdX1vKLdnP2MKqhD8O7KFOzF
OK thanks - but thats a nightmare of components to trawl through....(every component in my plugin - and its big) so I will have to find another way...
-
@Lindon You can use regex with the
Content.getAllComponents();
to try to narrow it down a bit. You can also do it once in on init and store all your references in arrays/variables so there is no overhead once the plugin is loaded. -
@d-healey - yeah but I may as well just reference the widgets directly and load them into an array on init - its hardly any more work - and actually less in the init (but we are talking microseconds here..) Thanks anyway..
-
@Lindon if your children are panels then use childPanel() might be the solution
-
@ustk sadly they are not.
-
@lindon Digging up this old thread as I was looking for something else. Just thought I'd let you know that I added a
Panel.getChildComponents()
function a few weeks ago. https://github.com/christophhart/HISE/pull/235