textview glade-2
- From: Debian User <wide288 yahoo com cn>
- To: gtk-app-devel-list gnome org
- Subject: textview glade-2
- Date: Sat, 3 Jul 2004 16:08:18 +0800
Hi,everyone
about textview widget ,I think know When i use glade-2 create a
window , textview, button, etc widget.(in interface.c file) How to string(gchar *str1) write to textview.
(in callback.c) .
How to textview's string write to string (gchar *str2), "printf("%s\n",str2);" .
How to clear textview widget's text .
i do it .no good.:
==============================
filename : interface.c :
g_signal_connect_swapped ((gpointer) button1, "clicked",
G_CALLBACK (on_button1_clicked),
GTK_OBJECT (textview1));
filename: callback.c :
void
on_button1_clicked (GtkButton *button,
gpointer user_data)
{ //clean textview's text
GtkTextBuffer *textbuffer =NULL;
g_assert(GTK_IS_TEXT_VIEW(user_data));
textbuffer =gtk_text_view_get_buffer(GTK_TEXT_VIEW (user_data));
gtk_text_buffer_delete_selection(textbuffer,TRUE, TRUE);
}
wide288
2004-7-3
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]