Re: mouse click on labels




I understand now, thanks again

TORRI Vincent wrote:
On Thu, 21 Nov 2002, Razvan wrote:

  
I try both form: "button-press-evetn" and "button_press_event"
and none works :(
    

the both typo work. The problem is that a label does not have a window, so 
that it can't catch some events. You have to pack the label in an EventBox 
and catch the signal with this EventBox:

  label = gtk_label_new("text");   
  box = gtk_event_box_new();
  gtk_container_add(GTK_CONTAINER(box), label);
  g_signal_connect(G_OBJECT(box), "button_press_event", 
G_CALLBACK(test_signal_label), NULL);

Vincent

  
Emmanuel Saracco wrote:

 On Thu, 21 Nov 2002 15:09:28 +0200
Razvan <razvaneduard xnet ro> wrote:

  

 Ho can I detect a mouse click on a label?

I try allready "button-oress-event" from GtkWidget

g_sinal_connect(label,"button-press-event" ....


but not works.

Any help appreciated,thanks :)
    

 there is a error in your typo. it's : "button_press_event"

?

bye
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


-------------------------------------------------------
Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV AntiVirus.
Xnet automatically scans all messages for viruses using RAV AntiVirus.


Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele lor. Va rugam sa luati in considerare ca exista un risc de fiecare data cand deschideti fisiere atasate si ca MobiFon nu este responsabila pentru nici un prejudiciu cauzat de virusi.

Disclaimer: RAV AntiVirus may not be able to detect all new viruses and variants. Please be aware that there is a risk involved whenever opening e-mail attachments to your computer and that MobiFon is not responsible for any damages caused by viruses.


  


 -- 
Razvan
razvaneduard xnet ro

------------------------------------------------------- Xnet scaneaza
automat toate mesajele impotriva virusilor folosind RAV AntiVirus. Xnet
automatically scans all messages for viruses using RAV AntiVirus. Nota:
RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele
lor. Va rugam sa luati in considerare ca exista un risc de fiecare data
cand deschideti fisiere atasate si ca MobiFon nu este responsabila pentru
nici un prejudiciu cauzat de virusi. Disclaimer: RAV AntiVirus may not be
able to detect all new viruses and variants. Please be aware that there
is a risk involved whenever opening e-mail attachments to your computer
and that MobiFon is not responsible for any damages caused by viruses.
_______________________________________________ gtk-app-devel-list
mailing list gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

    

  

-- 
Razvan
razvaneduard xnet ro

------------------------------------------------------- Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV AntiVirus. Xnet automatically scans all messages for viruses using RAV AntiVirus. Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele lor. Va rugam sa luati in considerare ca exista un risc de fiecare data cand deschideti fisiere atasate si ca MobiFon nu este responsabila pentru nici un prejudiciu cauzat de virusi. Disclaimer: RAV AntiVirus may not be able to detect all new viruses and variants. Please be aware that there is a risk involved whenever opening e-mail attachments to your computer and that MobiFon is not responsible for any damages caused by viruses.

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