Re: [gtk-list] Clist and some questions...



Hi!

On Fri, Jun 11, 1999 at 11:21:44PM +0200, Karol Bryd wrote:

>     I'm trying to write a plugin for XMMS and I have some problems
> with Clist and colors and fonts. I'm especially looking for
> informations about setting clist's entry's font, currently I do
> it using this code:
> 
>     style = gtk_widget_get_style(gtklist);
>     style = gtk_style_copy(style);
>     if(style)
>     {
>         style->font = current_font;
>         gtk_clist_set_row_style(GTK_CLIST(gtklist), line->line_number,
> style);
>     }
> 
> but apparently it isn't the right way becouse when I use this code,
> gtk_clist_set_background() refuses to work :-( and more precisely

It's the right way (because it's the only way ;). You just can't use
gtk_clist_set_background() when the row style is set.
Clist uses the different styles and colors in the following order :
cell style, row style, fg/bg colors, widget style.
With other words: if you set the row style you should change fg/bg
colors via style colors. So you can change normal colors, selection
colors etc.. Check the clist testgtk example, it uses cell and row
styles to change colors and fonts.

bye,
  Lars



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