필터 지우기
필터 지우기

How do I change the border style of a pushbutton with findjobj?

조회 수: 20 (최근 30일)
Caleb Thomas
Caleb Thomas 2017년 9월 2일
편집: Caleb Thomas 2017년 10월 18일
I have a GUI I created and made various themes for, however, there is a problem. Whenever I change the pushbutton background color to anything other than the default grey, it changes the button style from an etched border with hover highlighting to a beveled border and no hover highlighting. While the hover highlighting is nice, it isn't a must-have. However, I hate the look of the beveled pushbutton and would like to get the etched border back. I have looked at the finjobj function from file exchange, but I cannot figure out how to use it, even after looking at the undocumented matlab page. Can anybody help me with this and maybe provide an example code that changes a pushbutton border style to etched?
Thank you!

답변 (1개)

Yair Altman
Yair Altman 2017년 10월 17일
For a list of available border types, read the Swing documentation, and particularly the doc for EtchedBorder (note that you can customize the etch type and highlight/shadow colors).
  댓글 수: 1
Caleb Thomas
Caleb Thomas 2017년 10월 18일
편집: Caleb Thomas 2017년 10월 18일
Thank you for your response! There does seem to be a problem, though, and I'm afraid that at this point it may not be able to be remedied. The function works well whenever I use it with the default grey buttons. However, it will not effect any buttons that are not the default color. This seems odd to me, but it may just be the way Windows interacts with Matlab and can't be circumvented. Have you ever gotten it to work with a custom colored GUI?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by