Re: [gtk-list] Re: CList troubles



> John Davis wrote:
> 
> > For some reason only the selected row is visible
> > in the CList.  Every other row is black, but there is data there, if i
> > select the row, i can see it.
> 
> Had (.3) the same effect with the standard file selection dialog. First
> it is all black and after I double click the "." I see the files.
> 

A work-around is to explicitely set the color with
gtk_clist_set_foreground(), and
gtk_clist_set_background()

Here is an example:

    GtkWidget *clist;
    GdkColormap *cmap;
    GdkColor col_black, col_white;

    /* Allocate black and white */
    cmap = gdk_colormap_get_system();
    gdk_color_black(cmap, &col_black);
    gdk_color_white(cmap, &col_white);


    ...
    ...

	gtk_clist_set_foreground(GTK_CLIST(clist), i, &col_black);
        gtk_clist_set_background(GTK_CLIST(clist), i, &col_white);
    ...
    ...



----------------------------------------------------
Marc van Kempen                 BowTie Technology     
Email: marc@bowtie.nl            WWW & Databases
tel. +31 40 2 43 20 65         
fax. +31 40 2 44 21 86         http://www.bowtie.nl
----------------------------------------------------





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