buttons!!!



I have a "for" that produces a few buttons(their label
is contained in an array).
I want to g_print the label of the button that is
being pressed(actually do somenthing more, but this
will do for my question).
Is there any function that returns the label  of a
button? because if I do something like this it won't
work :



struct action_var{
    gchar simb;
    gchar ex;
    gint rez;
    gint add;
}; 

typedef struct action_var action_var ;

.........................................

for (col = 0 ; col <3 ; col++)
                    {   
                        act_var.simb = *jos[col];
                        
                        
                        but = gtk_button_new_with_label( jos[col] );
                        g_signal_connect(G_OBJECT (but) , "clicked",
G_CALLBACK(action) ,*act_var);
                        
                        gtk_box_pack_start(GTK_BOX(hbx) , but , TRUE ,
FALSE , 4);
                        gtk_widget_show(but);




__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/



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