In Guide, How to add border
    9 views (last 30 days)
  
       Show older comments
    
In static text, how to add border line
Like this

1 Comment
Answers (1)
  Jan
      
      
 on 6 Aug 2021
        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 Comment
  Rik
      
      
 on 6 Aug 2021
				I agree (both about the aestetics and functionality).
I would suggest setting Units to Normalized after creation to prevent issues when resizing the window.
See Also
Categories
				Find more on Interactive Control and Callbacks in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

