How do I get a window scrollable after I adjust app.UIFigure.Position through a Callback?
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Jiri Hajek
2023 年 1 月 31 日
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.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Develop uifigure-Based Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!