Re: GTK Labels
- From: "Florent. Devin" <Florent Devin lifl fr>
- To: "Michael P. Jarreau" <mike jactrls com>
- Cc: gtk-list gnome org
- Subject: Re: GTK Labels
- Date: Mon, 12 Mar 2001 07:26:05 +0100
"Michael P. Jarreau" wrote:
>
> I have a problem trying to use the code to set label foreground and
> background color using the following code. The code does work for text
> boxes and I thought it would be identical for all widgets. Can you tell me
> if I am missing the point somehow?
>
> Thanks,
> Mike
>
> void ColorSet (GtkWidget *target,
> GdkColor *newColor,
> int foreground)
> {
> GtkStyle *style;
> gint i;
>
> style = gtk_style_copy (gtk_widget_get_style (target));
>
> if (foreground)
> {
> // Foreground color.
> for (i = 0; i < 5; i++)
> {
> style->text[i] = *newColor;
> }
> }
> else
> {
> // Background color.
> for (i = 0; i < 5; i++)
> {
> style->base[i] = *newColor;
> }
> }
>
> gtk_widget_set_style (target, style);
> }
>
Talk this a week before...
The problem is that GtkLabel, doesn't have there own window.
If you want to do this, look at the mailing list archive
--
Florent DEVIN, 33 (0)3 20 43 47 30, Fax (33) (0)3 20 43 65 66 (Fax LIFL)
LIFL, Laboratoire d'Informatique Fondamentale de LILLE
USTL, Bureau 326, Batiment M3, 59655 Villeneuve d'Ascq Cedex
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]