Re: gtklabel + transparent background



In message <004e01c075a7$5bf1dee0$82df8283 nigo1pcrm07pc09 pcr univie ac at>you
 write:
>Hi there,
>
>In my test program a label always has a transparent background. How to give
>a label a fixed background color. Setting the Style's background color has
>no effect. I also played around with widgets flags but could not find
>something suitable. Did anyone know something about this?

you can't. a label has no background because it has no window; its
just a way of drawing text onto an existing window. when a label is
drawn, it only affects the foreground of the window it exists in.

pack the label into a GtkFixed or a GtkEventBox, and then set the
background color of the container.

--p




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