background colors revisited




	I asked a couple of days ago on how to change the colors of a text
entry and a scrolled window.  Thanks to everyone who replied.  However
none of the methods suggested worked.  Changing the the contents of the
style structure and using rc files changed the border of them as well as
the text within them.  But the background of these widgets remained
white.  I found the structure of the text entry widget.  The only thing
that I guessed would contain the color for the background was the
GdkWindow or the GdkPixmap.  I looked at how these things were initialized
in gtk_entry_new but my lack of years of programming experience left me at
a loss.  So I ask again if anyone has any ideas.  Thank you much.

	Bryan

struct _GtkEntry
{
  GtkEditable editable;

  GdkWindow *text_area;
  GdkPixmap *backing_pixmap;
  GdkCursor *cursor;
  gchar *text;

  guint16 text_size;
  guint16 text_length;
  guint16 text_max_length;
  gint    scroll_offset;
  guint   visible : 1;
  guint32 timer;
  guint   button;

  /* The total number of characters (not bytes) in the entry */
  guint nchars;

  /* The byte offset of each character
   *  (including the last insertion position) */
  guint16 *char_pos;

  /* The x-offset of each character (including the last insertion
position)
   * only valid when the widget is realized */
  gint *char_offset;
};




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