Effacer les filtres
Effacer les filtres

GUI buttons

3 vues (au cours des 30 derniers jours)
Razvan
Razvan le 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

Réponse acceptée

Jan
Jan le 18 Sep 2011
  1 commentaire
Razvan
Razvan le 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

Connectez-vous pour commenter.

Plus de réponses (1)

Image Analyst
Image Analyst le 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 commentaire
Razvan
Razvan le 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...

Connectez-vous pour commenter.

Catégories

En savoir plus sur Read, Write, and Modify Image dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by