[gtk-list] Re: gtktext (gtk+970606)
- From: hideki70 osk2 threewebnet or jp (HIDEKI Fujimoto)
- To: gtk-list redhat com
- Subject: [gtk-list] Re: gtktext (gtk+970606)
- Date: Thu, 24 Jul 1997 22:14:53 -0400
From: "Michael K. Johnson" <johnsonm@redhat.com>
Subject: [gtk-list] Re: gtktext (gtk+970606)
Date: Fri, 25 Jul 1997 11:23:28 -0400
> >1. I cannot change background color on the text widget.
>
> That's because a text widget is a lightweight widget that does not
> have a window associated with it. It draws on its parent. This means
> that you need to put the text widget in some other widget and change
> the other widget's background color to do this.
I see. thanks you.
> >2. I cannot clean a displayed text to show new text on
> > the text widget.
>
> I don't understand quite what you are saying, so I'll not try to
> answer this one. Could you possibly restate?
Sorry. I have tried again.
I display text file on text widget by useing gtk_text_insert()
like a bellow.
void
file_selection_ok(widget, fs)
GtkWidget *widget;
GtkWidget *fs;
{
unsigned char *buf;
buf = get_file(gtk_file_selection_get_filename(GTK_FILE_SELECTION(fs)));
gtk_widget_destroy(fs);
gtk_text_insert(GTK_TEXT (text), NULL, &text->style->black,NULL,
buf, -1);
gtk_text_thaw(GTK_TEXT (text));
}
After diplaying a text file, I reopen file sellection window
(gtkfilesel widget) from menu to display a new text file by
calling file_sellection_ok(). So, The _new_ text should add
to the _old_ text on text widget. I want to avoid this by
removing the _old_ text from text widget.
Could I make my state understand to you ?
---
HIDEKI
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]