MATLAB Answers

How to make trasparent the background of the static text.

34 ビュー (過去 30 日間)
Jhon Rackham
Jhon Rackham 2019 年 9 月 16 日
回答済み: Adam Danz 2019 年 9 月 16 日
Hi guys, i'm working on GUIDE and i want to make transparent the background of the static text, is it posible?

  0 件のコメント



Adam Danz
Adam Danz 2019 年 9 月 16 日
When you set the BackgroundColor of a static text box to "none", a black patch appears rather than transparency.
As a workaround, instead of a static text box you can open GUIDE and add a Axes in its place. After adding the axes, right click on the axes and select "property inspector"; scroll down to "Visible" and de-select the checkbox (visible = off).
Save, and close the GUI. Open the m-file and go to the opening function ("..._OpeningFcn"). Within the opening function you can set the text and specify the axes handle in the first input:
text(handles.axes1,.5,.5,'StaticTextHere','FontSize', 14,...
'HorizontalAlignment','Center','VerticalAlignment', 'middle') %this centeres the text in the invisible axes

  0 件のコメント


その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by