color of vscrollbar



Hi,
 
I wanted to add some colors to my current vscrollbar application.
 
the arrow labels should be in "white" color.
the bar should be in "blue" color.
rest everything the boxes and the vertical box in which the bar slides should be in black color.
 
the code I have written just makes the color of the arrow labels white. it makes the bar and the box in which both arrows are situtated black. the vetical box in which the bar slides is still showing default "gray" color.
 
How can I meet my requirements.
 
 
#include <gtk/gtk.h>
int main (int argc, char *argv[])
{
        GtkWidget *bar;
        GtkWidget *window;
        GtkStyle *style;
        GdkColor fgcolor, bgcolor;
        gtk_init (&argc, &argv);
        gdk_color_parse ("white", &fgcolor);
        gdk_color_parse ("black", &bgcolor);
        window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
        gtk_widget_set_size_request (window, 200, 200);
        bar = gtk_vscrollbar_new (NULL);
        style = gtk_widget_get_style (bar);
        style->fg[GTK_STATE_NORMAL]=fgcolor;
        style->bg[GTK_STATE_NORMAL]=bgcolor;
        gtk_widget_set_style(bar, style);
        gtk_container_add (GTK_CONTAINER(window), bar);
        gtk_widget_show_all (window);
        gtk_main ();
        return 0;
}

This message (including any attachment) is confidential and may be legally privileged. Access to this message by anyone other than the intended recipient(s) listed above is unauthorized. If you are not the intended recipient you are hereby notified that any disclosure, copying, or distribution of the message, or any action taken or omission of action by you in reliance upon it, is prohibited and may be unlawful. Please immediately notify the sender by reply e-mail and permanently delete all copies of the message if you have received this message in error.



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