Hello Again,
I must apologize for confusing a text box with a text entry. My previous
message and example code was for a text entry widget. My only experience
with a text box was within a user dialog widget. A text box apprears to be
used to display text that is inserted in the code, rather than the user
entering the text. Here is some sample code that inserts text into a text
box.
void open_userInfo_dialog(gchar *text)
{
GtkWidget *gtktext;
guint num_char = 0;
/*-------------------------------------------------------------
-- Create window if necessary
---------------------------------------------------------------*/
if( open_userInf_dialog == NULL )
open_userInf_dialog = create_userInfo_dialog();
/*-------------------------------------------------------------
-- Set the text in the userInfo_dialog
---------------------------------------------------------------*/
/*---: Check if there is text resident in the text box.
-----: If so, delete the text so the new text can be inserted */
gtktext = lookup_widget(open_userInf_dialog, "userInfo_text");
num_char = gtk_text_get_length(GTK_TEXT(gtktext));
if( num_char > 0 )
{
gtk_text_freeze (GTK_TEXT (gtktext));
gtk_text_backward_delete(GTK_TEXT(gtktext), num_char);
gtk_text_thaw (GTK_TEXT (gtktext));
}
/*---: Insert the text into the text box :----*/
gtk_text_freeze (GTK_TEXT (gtktext));
gtk_text_insert (GTK_TEXT (gtktext), NULL, >ktext->style->black, NULL,
text, -1);
gtk_text_thaw (GTK_TEXT (gtktext));
gtk_widget_show (open_userInf_dialog);
gdk_window_raise (open_userInf_dialog->window);
} /* End of open_userInfo_dialog */
_______________________________________________
Glade-devel maillist - [EMAIL PROTECTED]
http://lists.helixcode.com/mailman/listinfo/glade-devel