Re: ComboBox Background Colour



As Pierre said, Color is in Gdk.

Also, Gdk::colormap should be Gdk::Colormap and it can't be
instantitated directly since the constructor is protected.  You'll
need to so something like:
Glib::RefPtr<Gdk::Colormap> cm = Gdk::Colormap::get_system();

jonner

On 1/28/06, jalqadir netscape net <jalqadir netscape net> wrote:
>
>
> Hey folks!
> I did the following to change the bg of a Combobox :
>   Gdk::colormap cm();
>   Gtk::Color color("red");
>   cm.alloc_color(color);
>   combo_box->modify_bg(Gtk::STATE_ACTIVE,color);
>
> but I get the compiler complains saying:
> IC:/GnuWin32/include/gtk-2.0 -IC:/GnuWin32/include/sigc++-2.0
> -IC:/GnuWin32/lib/sigc++-2.0/include -IC:/GnuWin32/include/glib-2.0
> -IC:/GnuWin32/lib/glib-2.0/include -IC:/GnuWin32/lib/gtk-2.0/include
> -IC:/GnuWin32/include/pango-1.0 -IC:/GnuWin32/include/atk-1.0
> -fno-access-control -fexceptions -fverbose-asm -pg -g3
> ../jme/gtkmmwidget/gtkmmwidget.cpp: In constructor
> `jme::ComboBox::ComboBox(const gchar*, gint)':
> ../jme/gtkmmwidget/gtkmmwidget.cpp:118: error: `colormap'
> is not a member of `Gdk'
> ../jme/gtkmmwidget/gtkmmwidget.cpp:118: error: expected `;'
> before "cm"
> ../jme/gtkmmwidget/gtkmmwidget.cpp:119: error: `Color' is
> not a member of `Gtk'
> ../jme/gtkmmwidget/gtkmmwidget.cpp:119: error: expected `;'
> before "color"
> ../jme/gtkmmwidget/gtkmmwidget.cpp:120: error: `cm'
> undeclared (first use this function)
> ../jme/gtkmmwidget/gtkmmwidget.cpp:120: error: (Each
> undeclared identifier is reported only once for each function it appears
> in.)
> ../jme/gtkmmwidget/gtkmmwidget.cpp:120: error: `color'
> undeclared (first use this function)
> make.exe: *** [../jme/gtkmmwidget/gtkmmwidget.o] Error 1
> Execution terminated
>
> What am I doing wrong?
>
> * You cannot exercise your power to a point of humiliation.
> - Jean Chretien
>
> * It's amazing how the small seeds of distrust and misunderstanding
> can yield a crop of hate and death...
>
> * If that document has fine printing anywhere, just chuck it in the garbage
> - Jorge Escalante
> Ma'assalama! Adiós! bye! ________________________________
>  Try the New Netscape Mail Today!
>  Virtually Spam-Free | More Storage | Import Your Contact List
> http://mail.netscape.com
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
>
>



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