How to change the border color of a pushbutton in guide
조회 수: 7 (최근 30일)
이전 댓글 표시
I am trying to see if I can add a color to the border of a pushbutton.
I checked some undocumented matlab and found this: link
jEdit = findjobj(handles.open) ; % handles.open -- pushbutton name - open
lineColor = java.awt.Color(1,0,0); % =red
thickness = 3; % pixels
roundedCorners = true;
newBorder = javax.swing.border.LineBorder(lineColor,thickness,roundedCorners);
jEdit.Border = newBorder;
jEdit.repaint; % redraw the modified control
This works for edit textbox but not for pushbutton.
I went through a similar question: Here. It shows that buttons border style is not affected after changing anything from default setting.
Any help is great.
댓글 수: 3
답변 (0개)
참고 항목
카테고리
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!