button label problem

2002-08-13 Thread vyadav
hi all . how can we change the label of button after clicking it ... i mean..i have set one label for the buttton..and i want to change it when i click on the button... plz help... thanx...

Re: button label problem

2002-08-13 Thread John . Cupitt
[EMAIL PROTECTED] wrote: > how can we change the label of button after clicking it ... > i mean..i have set one label for the buttton..and i want to change it > when i click on the button... http://developer.gnome.org/doc/API/2.0/gtk/gtklabel.html#gtk-label-set-text ===

Re: button label problem

2002-08-13 Thread Olexiy Avramchenko
[EMAIL PROTECTED] wrote: >hi all . > how can we change the label of button after clicking it ... > i mean..i have set one label for the buttton..and i want to change it >when i click on the button... > >plz help... >thanx... > > just do smth like this: --- void button_clicke

Re: button label problem

2002-08-13 Thread vyadav
hi.. i did like it..but i got undefined reference of "gtk_button_set_label" then what should i do thanx...

Re: button label problem

2002-08-13 Thread Olexiy Avramchenko
[EMAIL PROTECTED] wrote: > hi.. > > i did like it..but i got undefined reference of "gtk_button_set_label" > >then what should i do > > thanx... > Oops, you're using gtk+-1.2, the gtk_button_set_label function is from gtk+-2.0 library. Try this: --- gtk_label_set_text(GTK_LABEL

Re: button label problem

2002-08-13 Thread vyadav
hi... thanx for ur help i want to ask one more thing..if i changed the label by clicking once..how can i change it again on next click... thanx..in advance...

Re: button label problem

2002-08-13 Thread Daniel Carrera
I'm not sure what you want. Do you want the button to change back and forth between two labels each time you click? Daniel On Wed, 14 Aug 2002 [EMAIL PROTECTED] wrote: > >hi... > > thanx for ur help > > i want to ask one more thing..if i changed the label by clicking > on

Re: button label problem

2002-08-13 Thread vyadav
hi .. yeah exactly i want it can u help me.. thanx..

Re: button label problem

2002-08-13 Thread Daniel Carrera
Here is one idea. Use a global variable to keep track of which label you have on, and keep the label global as well so you can change it. 1.- gtk_signal_connect to connect the "clicked" signal to a callback. 2.- The callback receives the button widget as an argument. 3.- gtk_label_set_text