Change color of greyed widget

Dear all, thanks for your answer of my other question

now I got another question

how to change color of greyed widget?

I use style “click button to edit” form, so when my frame is not in
editable
mode,
I set sensitive to false.
but the frame became grey that makes it hard to read anything written on
textbox inside the frame

I need to set sensitive to false, change color for easy recognation, but
still having the text readble easily,
i don’t know, perhaps more yellowish rather than greyish?

Thanks :slight_smile:

hendra kusuma wrote in post #1028313:

how to change color of greyed widget?

I use style “click button to edit” form, so when my frame is not in
editable
mode,
I set sensitive to false.
but the frame became grey that makes it hard to read anything written on
textbox inside the frame

I need to set sensitive to false, change color for easy recognation, but
still having the text readble easily,
i don’t know, perhaps more yellowish rather than greyish?

Something like :

widget_instance.modify_bg(Gtk::STATE_INSENSITIVE,
Gdk::Color.parse(“yellow”))

Look at :
http://ruby-gnome2.sourceforge.jp/hiki.cgi?cmd=view&p=Gtk%3A%3AWidget&key=modify_base#modify_base
and
ruby-gnome2.sourceforge.jp/hiki.cgi?cmd=view&p=Gtk%3A%3AWidget&key=modify_base#modify_base/modify

Simon

On Tue, Oct 25, 2011 at 6:00 PM, Simon A. <
[email protected]> wrote:

I need to set sensitive to false, change color for easy recognation, but

http://ruby-gnome2.sourceforge.jp/hiki.cgi?cmd=view&p=Gtk%3A%3AWidget&key=modify_base#modify_base

and

ruby-gnome2.sourceforge.jp/hiki.cgi?cmd=view&p=Gtk%3A%3AWidget&key=modify_base#modify_base/modify

Simon

Thanks, that’s very helpful

I found modify_base works here, and that’s only on input widget like
entry,
not container like frame
so I change my code to set modify_base of all entry and set modify_text
to
black to ensure it can be read

Well, that fix my problem :slight_smile:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs