How to modify the background color of a GtkTextView?
- From: mili <milimeter 163 com>
- To: gtk-list gnome org
- Subject: How to modify the background color of a GtkTextView?
- Date: Wed, 28 Aug 2002 11:37:03 +0000
Hi, anyone
I wrote the following codes:
>>>>>>
TextRcStyle:=gtk_rc_style_new();
TextRcStyle^.base[0].red :=54783;
TextRcStyle^.base[0].green :=55039;
TextRcStyle^.base[0].blue :=54783;
pango_font_description_free(TextRcStyle^.font_desc);
font_desc:=pango_font_description_from_string('Simsun 16');
<<<<<<
Then I try to apply TextRcStyle to a text_view:
gtk_widget_modify_style(PGtkWidget(tree_view),MypanelSettings.TreeRcStyle);
The result is that font is modified correctly, but color remains white. Then I
add the following line:
gtk_widget_modify_base(PGtkWidget(tree_view),GTK_STATE_NORMAL,@(MypanelSettings.TextRcStyle^.base[0]));
Now the color is also modified as what I want. So I think perhaps I used a
wrong way of colors of GtkRcStyle. Can anybody give me an instruction on how
to use correctly the GtkRcStyle and Color system?
Thank you very much.
Yours,
mili
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]