Gtk color API
- From: "nisha jain" <jain61 gmail com>
- To: "gtk-devel-list gnome org" <gtk-devel-list gnome org>
- Subject: Gtk color API
- Date: Sat, 29 Mar 2008 03:14:52 -0500
Hi All,
I have requirement of making boxes filled with colors without any functionality.
To acheive this i am using the labels and trying to fill them with colors
as doing it with other widgets i am not able to figure out...
I am using following code to acheive it but i am not getting any output...
GtkWidgets *labels[2];
GtkWidget color;
for(i = 0; i<2; i++)
{
labels[i] = gtk_label_new("");
}
gdk_color_parse("red", &color);
gtk_widget_modify_bg(GTK_WIDGET(labels[0]), GTK_STATE_NORMAL, &color);
gdk_color_parse("green", &color);
gtk_widget_modify_bg(GTK_WIDGET(labels[1]), GTK_STATE_NORMAL, &color);
I am trying to pack these in a box but that is not working though i am not getting any errors.
Please let me know if some one has similar functionality in any application? How i can acheive this?
Regards,
Nisha
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]