Filter löschen
Filter löschen

GUI buttons

3 Ansichten (letzte 30 Tage)
Razvan
Razvan am 17 Sep. 2011
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

Akzeptierte Antwort

Jan
Jan am 18 Sep. 2011
  1 Kommentar
Razvan
Razvan am 19 Sep. 2011
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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Image Analyst
Image Analyst am 17 Sep. 2011
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 Kommentar
Razvan
Razvan am 18 Sep. 2011
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...

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Read, Write, and Modify Image finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by