how to set GtkText background color?
- From: Denis Dzyubenko <shad mail kubtelecom ru>
- To: gtk-app-devel-list gnome org
- Subject: how to set GtkText background color?
- Date: Thu, 4 Jul 2002 21:49:39 +0400
Hello,
How can I set background color in the GtkText?
I tried change it using Styles, but this didn't help.
=+==
        GtkStyle *style;
        GdkColor bg_color;
        bg_color.red   = params.bg_color[0]*65535;
        bg_color.green = params.bg_color[1]*65535;
        bg_color.blue  = params.bg_color[2]*65535;
        gdk_colormap_alloc_color(
                        gtk_widget_get_colormap(edit_box), &bg_color, 
                        FALSE, FALSE);
                
        style = gtk_style_copy(gtk_widget_get_style(edit_box));
        
        style->base[GTK_STATE_NORMAL] = bg_color;
        gtk_widget_set_style(edit_box, style);
        text_reload(); // here I delete entire text and insert it again
=+==
-- 
Best regards,
  Denis Dzyubenko <shad mail kubtelecom ru>
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]