RE-use helper function on multiple GUI components
Ältere Kommentare anzeigen
I am working on an app that displays information about an image that has been loaded. The user imports an image and it is displayed on an axes component. From there, the user selects 4 ROIs and the app displays some properties of each ROI (pixel count, average value, min and max, std dev) in a panel. Rather than write 4 separate functions for displaying all the information, is there a way I can re-use one function to update each panel? Right now I am looking at replicating this 4 times (r1, r2, r3, and r4):
app.r1PixelsEditField.Value = region.pixel_count;
app.r1AvgCountsEditField.Value = region.count_average;
app.r1MinCountEditField.Value = region.count_min;
app.r1MaxCountEditField.Value = region.count_max;
app.r1StdDevEditField.Value = region.std_dev;
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
