App Designer GUI cutting off at top
19 ビュー (過去 30 日間)
古いコメントを表示
Hi
When I design an app I find any elements at the top of the canvas are cropped (see image attached). This is not a problem for apps I design myself as I can just move the elements down a little, but when my colleagues send me apps, I am unable to access the top portion even when resizing the window.
Is there a way to fix this behaviour?
Many thanks!

4 件のコメント
Abhiram
2025 年 2 月 20 日
Can you see if changing the Text Size to 100% resolves the issue?
Go to Windows Start menu > Settings > Accessibility > Text size and set the Text Size to 100%
回答 (1 件)
Kevin Holly
2025 年 2 月 21 日
I'm going to make the assumption that your colleague has a different screen resolution. I would suggest using the UI Component uigridlayout which can be found in the Component Library within App Designer. I would drag this component onto the app after all other UI Components have been placed. With the grid layout, columns and rows can be have a property of fit, fixed, or weighted. This can dictate how the UI Components scale when the UIFigure window size is changed. You could also change the WindowState property of the UI Figure to be normal, maximized, minimized, or fullscreen. Alternatively, you can create a startup function and position the app. For instance:
function startupFcn(app)
app.UIFigure.Units = "normalized";
app.UIFigure.Position = [0.1 0.1 0.8 0.8];
app.UIFigure.Units = "pixels";
end
Please let me know if this does/doesn't resolve the issue.
2 件のコメント
Kevin Holly
2025 年 2 月 21 日
編集済み: Kevin Holly
2025 年 2 月 21 日
If it cuts off on the right side after using gridlayout, this could mean that the columns that are set to "fixed" add up to too many pixels to fit in the window. Perhaps you can make more columns "weighted". Also note that UI components can cover more than one grid, so you could make the knob bigger.
Once the app is properly made with the uigridlayout and then compiled to a binary, it should behave better with different screen resolution.
If you would like a video call to go over it, you can reach me at kevinh@mathworks.com.
参考
カテゴリ
Help Center および 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!
