Re: regarding signals!!!
- From: Carlo <carlo-ag libero it>
 
- To: gtk-list gnome org
 
- Subject: Re: regarding signals!!!
 
- Date: Wed, 30 Jun 2004 10:41:09 +0200
 
vikram_dravid_sr ha scritto lo scorso 30/06/04 8.00:
hi , i need to know how i can get the text inserted into a text box 
printed on my konsole???? should i use callbacks in GTK........pl. let 
me know!!! vikram
------------------------------------------------------------------------
Here is a code snippet of a callback function that does what you ask:
void on_button1_clicked (GtkButton * button,
                         gpointer    user_data) {
        GtkWidget     * in,
                      * out;
        gchar         * text;
							
        /* widget pointer
         */
	in = lookup_widget (GTK_WIDGET (button), "entry1");
	
	/* text-entry content
         */
	text = (gchar *)gtk_entry_get_text (GTK_ENTRY (in));
	/* printout to console
         */
	g_print ("> %s\n", text);
}
HTH
Carlo
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]