Re: [gtkmm] How to determine the background color of the Gtk::Entry



On Thu, 2004-03-18 at 08:59, Eli Hadad wrote:
> Hi all,
> 
> I am trying to set the backgroung color of an Entry, i.e. the editable area.
> I first try setting the Style of the entry itself, than read that it can't
> be done to windowless widgets.
> So I added the Entry to EventBox and changed the EventBox's Style and this
> again didn't work.
> 
> In TextView it is possible working on it's TextBuffer.
> What is the way to do it for Entry ?
> 
> BTW: I am tring to create an Entry with a background color of it's window,
> so it will looks like
> a Label, is there a better/simple way to it.

This works fine.

Gdk::Color colRed;
	colRed.set_rgb_p (1, 0, 0);

	YourEntry->modify_base(Gtk::STATE_NORMAL, colRed);

You wont need an event box for this :-))

Attachment: signature.asc
Description: This is a digitally signed message part



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