RE-use helper function on multiple GUI components
显示 更早的评论
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;
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
