필터 지우기
필터 지우기

GUI buttons

조회 수: 3 (최근 30일)
Razvan
Razvan 2011년 9월 17일
Hi,
I created a GUI with some buttons and I noticed the nice blue color which appears over each button when the mouse is over it. I added to each button some image, with
set(button,'cdata',image);
but now the blue effect is lost when I put the mouse over the buttons. Is there a way to keep this effect after adding an image to a button?
Thanks,
Razvan

채택된 답변

Jan
Jan 2011년 9월 18일
  댓글 수: 1
Razvan
Razvan 2011년 9월 19일
Thanks Jan,
I was able to use the second function, but it has some bugs. If I put 2 buttons next to each other and I move the mouse from one to another, in the end both remain "pushed" (the second image remains active for both).
Thanks though.
Razvan

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

추가 답변 (1개)

Image Analyst
Image Analyst 2011년 9월 17일
Can you have a mouse move callback where it changes the image, with that set() command you used, whenever the mouse moves over the button? One image would have a blue tint. By the way, I don't see a color change - my buttons stay gray no matter if the mouse is over them or not. Maybe it's an operating system feature and you have a different operating system than me.
  댓글 수: 1
Razvan
Razvan 2011년 9월 18일
I use Matlab 2011b in Win 7 SP1 x64. I don't know how to attach a callback for when the mouse is over a button. I only know to attach a callback that starts when the button is pressed...

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

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by