Re: regarding signals!!!

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

 





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
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux