In Guide, How to add border
3 次查看(过去 30 天)
显示 更早的评论
In static text, how to add border line
Like this
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/704267/image.gif)
1 个评论
回答(1 个)
Jan
2021-8-6
figure;
uicontrol('Style', 'Text', 'String', '', 'BackgroundColor', 'k', ...
'Position', [20, 20, 64, 24]);
uicontrol('Style', 'Text', 'String', 'ABC', 'BackgroundColor', 'y', ...
'Position', [22, 22, 60, 20]);
Brrr. Ugly, but working.
1 个评论
Rik
2021-8-6
I agree (both about the aestetics and functionality).
I would suggest setting Units to Normalized after creation to prevent issues when resizing the window.
另请参阅
类别
在 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!