how to keep it's "face"



dear sir:
while check_button's color changed with the eventbox it is in, it's color is change to grey while it is focused.
while I change this check_button  bg color, a new problem appears there.
the check_button's face change from original ( like ms-window ) to change to other?
how to dearl with this problem?

do not focus it? or new code to solve it.
****************************************
       autoScrollBtn = gtk_check_button_new ( );
       gtk_widget_set_name (autoScrollBtn, "autoScrollBtn");
       gtk_widget_ref (autoScrollBtn);
gtk_object_set_data_full (GTK_OBJECT (preferSetDlg), "autoScrollBtn", autoScrollBtn, (GtkDestroyNotify) gtk_widget_unref);
       //setbaseColor(255, 0, 0, autoScrollBtn);
       //setbgColor(0, 255, 0, autoScrollBtn); //this will change the color
       //setfgColor(0, 0, 255, autoScrollBtn);
//gtk_widget_set (autoScrollBtn, "can_focus", FALSE, NULL); //only delete the black edge. //GTK_WIDGET_UNSET_FLAGS (autoScrollBtn, GTK_HAS_FOCUS); //auto focus //GTK_WIDGET_SET_FLAGS (autoScrollBtn, GTK_HAS_FOCUS); // no effect gtk_widget_show (autoScrollBtn); gtk_box_pack_start (GTK_BOX (hbox2), autoScrollBtn, FALSE, FALSE, 0);
******************************************************

thank you

xn




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