Manage multiple Gtk::Color
- From: Iker Perez de Albeniz <ialbeniz cbt es>
- To: gtkmm-list gnome org
- Subject: Manage multiple Gtk::Color
- Date: Thu, 27 Sep 2007 10:33:24 +0200
Hi,
I'm trying to make my own color selector.. with DrawingAras on
Gtk:Tables.. my proble is when i set the color of te drwaing areas:
(*nDrawingArea).modify_bg(Gtk::STATE_NORMAL, aux_Color);
i ned to use a gtk::color widget... so i use an aux_color widget that
changes its color for the diferent drwaing areas:
aux_Color.set_rgb_p(0,0,colour_p);
when i execute the code all the drawing areas apears with the same color
(the last color asigned to aux_Color)..
****************************************************
for(i=0 ; i<5 ; i++){
for(j=0 ; j<5 ; j++){
colour_p = 100 - (4 * count);
aux_Color.set_rgb_p(0,0,colour_p);
Gtk::DrawingArea* nDrawingArea = Gtk::manage(new Gtk::DrawingArea);
(*nDrawingArea).modify_bg(Gtk::STATE_NORMAL, aux_Color);
(*nDrawingArea).set_size_request(7,7);
m_Table1.attach(*nDrawingArea,i,i+1,j,j+1);
std::cout << "color:" << count <<"\n";
count++;
}
}
*************************************************
i have tried to make
Gtk::Color* nColor = Gtk::manage(new Gtk::Color);
(*nColor)..set_rgb_p(0,0,colour_p);
and then..
(*nDrawingArea).modify_bg(Gtk::STATE_NORMAL, aux_Color);
but the builder makes an error because Gtk::Color dont have
set_manage()..
any other way to do this?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]