App Designer GUI cutting off at top
24 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Abhiram
am 20 Feb. 2025
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%
Antworten (1)
Kevin Holly
am 21 Feb. 2025
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 Kommentare
Kevin Holly
am 21 Feb. 2025
Bearbeitet: Kevin Holly
am 21 Feb. 2025
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.
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!