Re: Icon click event



On 2011-06-24 at 01:02, behrooz shafiee wrote:
> Hello all,
> currently i am trying to develop a persian calender gnome-extension but due
> to lack of any kind of documentation its really difficult and i just try to
> understand existing samples.
> i have an icon:
> let Icon = new St.Icon(icon_prop);
> and i want to bind on it a clicked or button-release-event, like a button!
> i dont know if it's possible or not!!
> i tried something like this but doesnt work:
> Icon.connect('button-release-event', Lang.bind(this, _function));

you need to set the icon as reactive:

  Icon.reactive = true;

in order for it to receive events and emit signals.

St.Icon is a Clutter.Actor, so the Clutter documentation should be
relevant to your issue.

ciao,
 Emmanuele.

-- 
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]