Re: [gtk-list] clist: colored rows



Hi,

Take a look at:

http://borco-ei.eng.hokudai.ac.jp/~borco/images/vdk/langdrill/shot1.gif
http://borco-ei.eng.hokudai.ac.jp/~borco/vdk/langdrill.html

The program uses VDK. This is the code from VDK that sets the colors in
the clist:

void VDKCustomList::SetStyle(int row)
{
 GtkStyle *style = gtk_style_copy(GTK_WIDGET(custom_widget)->style);
 gtk_style_ref(style);
 if(UnselectedBackground)
   style->base[GTK_STATE_NORMAL] = *(*UnselectedBackground);
 if(SelectedBackground)
   style->bg[GTK_STATE_SELECTED] = *(*SelectedBackground);
 if(UnselectedForeground)
   style->fg[GTK_STATE_NORMAL] = *(*UnselectedForeground);
 if(SelectedForeground)
   style->fg[GTK_STATE_SELECTED] = *(*SelectedForeground);
 gtk_clist_set_row_style (GTK_CLIST (custom_widget), row, style);
}

Ionutz
-- 
Mental backup in progress - Do Not Disturb!
--
http://borco-ei.eng.hokudai.ac.jp/~borco/



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