Specifying attributes of objects created in GUIDE
1 次查看(过去 30 天)
显示 更早的评论
I'm creating a UI using GUIDE. It is important that I position items in the UI in exact locations. I can only approximately position objects using the mouse to move the objects around. Is there a command line method to specify - for instance - exact coordinates of a button's position i.e., [1.0, 1.0, 2.0, 1.5]?
0 个评论
采纳的回答
Dennis
2019-4-24
If you want to do this in guide you can get there in 3 steps:
1.) right click on your object
2.) chose 'Property Inspector'
3.) go to 'Location and Size' (Group Properties) or 'Position (List Properties)
更多回答(1 个)
Alex Mcaulley
2019-4-24
编辑:Alex Mcaulley
2019-4-24
set(handles.yourButton,'Units', 'pixels') %If your position is in pixels
set(handles.yourButton,'Position', [1.0, 1.0, 2.0, 1.5])
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!