Clear Filters
Clear Filters

GUI buttons

3 views (last 30 days)
Razvan
Razvan on 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

Accepted Answer

Jan
Jan on 18 Sep 2011
  1 Comment
Razvan
Razvan on 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

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 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 Comment
Razvan
Razvan on 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...

Sign in to comment.

Categories

Find more on Read, Write, and Modify Image in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!