How do I get a window scrollable after I adjust app.UIFigure.Position through a Callback?
5 views (last 30 days)
Show older comments
I am creating an application through app designer that requires insertion of components/fields depending on user need. I think I've figured out how to add new fields based on a pushed-button callback. In the same callback, I try to resize the app.UIFigure.Position to allow space to include these new components/fields for user input, but when I change it from, for example:
app.UIFigure.Position = [100 100 1616 1152] to app.UIFigure.Position = [100 100 1616 6000], there is no scroller for the new space created. I want to add another row of components/fields for user input at the bottom of a long list of components that already exist when it is set to app.UIFigure.Position = [100 100 1616 1152]. In the button callback, I change app.UIFigure.Position = [100 100 1616 6000] and input app.uidropdown(app.UIFigure).Position = [100 100 215 22]. Since I changed the UIFigure to be 6000 (height), shouldn't the new drop down be positioned 100 from the bottom of the new height? The drop down does not end up in the right spot and doesn't seem like the app has been extended enough to allow scrollability even though I have that interactivity option checked. Any suggestions?
2 Comments
Jiri Hajek
on 31 Jan 2023
Hi, your approach seems awkward and you seem to ignore features of appdesigner that could help you with this. Why don't use tiledlayout or a grid to take care of the individual components in youw app window? In such a case, when your components (fields) are placed in the grid and the user manipulates app window, the scrollablle grids adjust dynamically as expected.
Answers (0)
See Also
Categories
Find more on Develop uifigure-Based Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!