RE: [INIMSS] How to add and delete text from GtkText.



To put text into a GtkText widget, use:

        gchar *mytext = "this is a \n\ntest";
        GtkText *mycontrol;

        gtk_text_insert(GTK_TEXT(mycontrol), 
                            NULL, 
                            NULL, 
                            NULL, 
                            mytext,
                            strlen(mytext));

To get text use:

        gchar *newtext = NULL;
        newtext = gtk_editable_get_chars(GTK_EDITABLE(mycontrol), 0, -1);


Martyn


-----Original Message-----
From: Dino Cherian K [mailto:inimss yahoo com] 
Sent: 24 February 2002 08:11
To: gtk-app-devel-list gnome org
Subject: [INIMSS] How to add and delete text from GtkText.

Hi All

Anybody please help me with some sample code for adding and deleting text 
from GtkText

Thank You
Dino CK
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



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