# .signal\_emit but the button is not "clicked"

**URL:** <https://www.ruby-forum.com/t/signal-emit-but-the-button-is-not-clicked/211485>\
**Category:** Ruby-Gnome 2\
**Created:** [September 5, 2011, 2:39pm UTC](https://www.ruby-forum.com/t/signal-emit-but-the-button-is-not-clicked/211485 "2011-09-05T14:39:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [September 5, 2011, 2:39pm UTC](https://www.ruby-forum.com/t/signal-emit-but-the-button-is-not-clicked/211485/1 "2011-09-05T14:39:20Z")

</div>

Hi,

With:

@button.signal\_emit(:clicked)

We can simulate a button is clicked.

But, is there a way to also simulate an on\_hover event on that button?

With my mouse, when I hover over the button it changes the highlighted  
colour.

I want to do and change the button highlighted colour for 2 seconds when  
I do .signal\_emit but I am not sure how …

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [September 5, 2011, 9:13pm UTC](https://www.ruby-forum.com/t/signal-emit-but-the-button-is-not-clicked/211485/2 "2011-09-05T21:13:41Z")

</div>

Marc H. wrote in post #1020209:

> Hi,
> 
> With:
> 
> @button.signal\_emit(:clicked)
> 
> We can simulate a button is clicked.
> 
> But, is there a way to also simulate an on\_hover event on that button?
> 
> With my mouse, when I hover over the button it changes the highlighted  
> colour.
> 
> I want to do and change the button highlighted colour for 2 seconds when  
> I do .signal\_emit but I am not sure how …

I’m not sure what you want. If I understand well, you want to mimic the  
on\_hover visual from your code ?
