Re: Radio Buttons w/ Labels and RC STYLE
- From: Steve & Patti Getzinger <steveandpatti wubs org>
- To: gtk-app-devel-list gnome org
- Subject: Re: Radio Buttons w/ Labels and RC STYLE
- Date: Sun, 11 Mar 2001 12:49:36 -0500
I have managed to get the radio button to accept one prelight but not two
and have never managed to get the text to alter color. Here is what I am
using:
rc_style->bg[GTK_STATE_PRELIGHT] = blue;
rc_style->color_flags[GTK_STATE_PRELIGHT] = GTK_RC_BG;
rc_style->fg[GTK_STATE_PRELIGHT] = white;
rc_style->color_flags[GTK_STATE_PRELIGHT] = GTK_RC_FG;
for(i=0;i<number_of_lines;i++){
radiobutton = gtk_radio_button_new_with_label(group, lines[i])
group = gtk_radio_button_group(GTK_RADIO_BUTTON(radiobutton));
gtk_widget_ref(radiobutton);
gtk_object_set_data_full(GTK_OBJECT(window), "radiobutton",
radiobutton, (GtkDestroyNotify) gtk_widget_unref);
gtk_signal_connect(GTK_OBJECT(radiobutton), "clicked",
GTK_SIGNAL_FUNC(active_radio), lines[i]);
if (lines[i] == "my_string"){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radiobutton),
TRUE);
}
gtk_widget_modify_style(radiobutton);
gtk_rc_style_unref(rc_style);
gtk_widget_show(radiobutton);
gtk_box_pack_start(GTK_BOX(vbox), radiobutton, FALSE, FALSE, 0);
}
I have shortened up the names I am using but this is the code. Ideas as to
why one of the style changes take effect? Naturally it is the second one.
Steve
Steve & Patti Getzinger wrote:
I am playing with...to look?
Steve
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]