App Desinger: How to access Labels/Spinners via “Tags” in a custom UI component?
I have a modularized App Designer app with several custom UI components. One UI component is a setting for units (e.g. km/h – mph or deg – radiant). These settings should be applied to all other custom UI components. To reduce the implementation work I wan’t a generic solution like:
User changed the setting from "rad" toi "deg"
all custom UI components get notified and get the changed data
in the components should be a function with updates all Labels tagged with "LabelUnitAngle" from "rad" to "deg"
The non-generic solution is already working: comp.WheelAngleunitLabel.Text=comp.appSettings.units.angle.text;
comp.WheelAngleSpinner.Value = comp.ParamStore.WheelAngle*comp.appSettings.units.angle.factor;
I tried findall and findobj and tried using metaclasses but still no luck.I have a modularized App Designer app with several custom UI components. One UI component is a setting for units (e.g. km/h – mph or deg – radiant). These settings should be applied to all other custom UI components. To reduce the implementation work I wan’t a generic solution like:
User changed the setting from "rad" toi "deg"
all custom UI components get notified and get the changed data
in the components should be a function with updates all Labels tagged with "LabelUnitAngle" from "rad" to "deg"
The non-generic solution is already working: comp.WheelAngleunitLabel.Text=comp.appSettings.units.angle.text;
comp.WheelAngleSpinner.Value = comp.ParamStore.WheelAngle*comp.appSettings.units.angle.factor;
I tried findall and findobj and tried using metaclasses but still no luck. I have a modularized App Designer app with several custom UI components. One UI component is a setting for units (e.g. km/h – mph or deg – radiant). These settings should be applied to all other custom UI components. To reduce the implementation work I wan’t a generic solution like:
User changed the setting from "rad" toi "deg"
all custom UI components get notified and get the changed data
in the components should be a function with updates all Labels tagged with "LabelUnitAngle" from "rad" to "deg"
The non-generic solution is already working: comp.WheelAngleunitLabel.Text=comp.appSettings.units.angle.text;
comp.WheelAngleSpinner.Value = comp.ParamStore.WheelAngle*comp.appSettings.units.angle.factor;
I tried findall and findobj and tried using metaclasses but still no luck. customuicomponent, matlab.ui.componentcontainer.componentcontainer, tags MATLAB Answers — New Questions









