Re: gtk_databox_ruler



Hi Scott,

> gtk_databox_get_ruler_x returns a pointer to the GtkDataboxRuler type. 
> So if you want to use it as a widget, you're going to have to cast it to 
> a widget at some point. Either declare ruler as a *GtkDataboxRuler and use
> 
> gtk_widget_modify_bg(GTK_WIDGET(ruler), GTK_STATE_NORMAL, &color);
> 
> or declare ruler as a *GtkWidget and then use
> 
> ruler = GTK_WIDGET(gtk_databox_get_ruler_x(GTK_DATABOX(box));
> 
> Either solution will work fine. You can always use an object as any of 
> its inherited types, but you have to cast it.

ahh, I didn't know that I can use it as an Widget, although I declared it as GtkDataboxRuler. Thanks - I've to learn a lot...

Now, it's working. But with this way, just the foreground color could be change. The gtk_widget_modify_bg is not working. Is there any special, like "label" where you just can change the fg color?

Michael

________________________________________________________________
Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/



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