GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Mon Sep 22, 2014 12:15 pm

All times are UTC




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: I could use some help - C and GTK - color selection
PostPosted: Tue Feb 07, 2012 5:12 am 
Offline
Familiar Face

Joined: Mon May 05, 2008 3:38 am
Posts: 12
First, let me be the first to say it will be painfully obvious that what little knowledge I had of programming in C is pretty much non-existant now.

I'm trying to write a program whereby the user can select from several buttons, each of which will set a different parameters' color settings (the paramters are in a separate file and used for controlling another program). I have set up a test using 1 button. This in turns pops up a color selection screen, but I can't for the life of me figure out how to:

(1) Set the "default" color on the color wheel to one passed to the calling function

(2) Get the color that is selected. One of the ways I've seen for doing this just refuses to compile for me - the ones using a object called colorsel in the examples I have found on the net. It also doesn't show "OK" or things like that, plus it acts kinda of weird - I have to press the eyedropper, press a place on the color wheel, then put the eyedropper in the color box and click. I assume I either don't know how it works, or I need to do more to set it up (the wheel) before calling the dialog.

(3) What I want is a variable that I can pass around, write to a file, read from a file and use to set the default color above. I'm guessing that's some sort of hexadecimal variable but I hate to say I don't know how to define one in C anymore.

I'm running Ubuntu 11.10 and GTK 3.0. The code I've created so far, including code that is commented out because the program won't compile with it in, is below:

Code:
/**************************************************************************************/
/*         gscedit.c           gnome-shell.css editor                                 */
/*                                                                                    */
/*  This program allows modification of some of the parameters for configuring the    */
/*  Gnome shell as found in the gnome-shell.css file.                                 */
/*                                                                                    */
/*                                                                                    */
/*  Uses:                                                                             */
/*  ----                                                                              */
/*        GTK                                                                         */
/*                                                                                    */
/*                                                                                    */
/*  <Date>     Person             Description of Change/Activity                      */
/*  ........   .................  ..................................................  */
/*  02/04/12   Anewguy            Begin initial coding.                               */
/*                                                                                    */
/*                                                                                    */
/*   License:  This program is completely free - use as you want.  If you make any    */
/*             changes to this program, please note them in the above log, and agree  */
/*             to keep this program completely free.  No fee of any type, including   */
/*             a distribution fee, is allowed.  Use at your own risk.                 */
/*                                                                                    */
/**************************************************************************************/

#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
/*
          Variable definitions
*/

/*
          Function prototypes
*/

void do_message(char [], char[]);
void do_exit();
void get_color();
void get_color_ok();
void get_color_selected();

/**********************************************/
/*     main window coding starts here         */
/**********************************************/

int main( int argc, char *argv[] )
{
/*
          Variables dealing with the opening window
*/

GtkWidget *opening_window, *vbox1, *button1;

char tempstr1[256];
char tempstr2[256];
char tempstr3[256];
char tempstr4[256];

char tmppath1[256];
char tmppath2[256];
char tmppath3[256];
char tmppath4[256];
/*
    Create the opening window
*/

     gtk_init (&argc, &argv);

     opening_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
     gtk_window_set_title (GTK_WINDOW(opening_window), "GNOME SHELL CSS FILE EDITOR");
     gtk_widget_set_size_request (opening_window, 600,400);
     gtk_window_set_position (GTK_WINDOW(opening_window), GTK_WIN_POS_CENTER);
     g_signal_connect (G_OBJECT (opening_window), "delete_event",
                       G_CALLBACK (do_exit), NULL);
     g_signal_connect (G_OBJECT (opening_window), "destroy",
                       G_CALLBACK (do_exit), NULL);
     gtk_container_set_border_width (GTK_CONTAINER(opening_window), 20);

vbox1 = gtk_vbox_new(FALSE,0);
button1 = gtk_button_new_with_label ("test color selection");
gtk_container_add (GTK_CONTAINER (vbox1), button1);
g_signal_connect (G_OBJECT (button1), "pressed",
                  G_CALLBACK (get_color), NULL);
gtk_widget_show(button1);
gtk_widget_show(vbox1);
gtk_container_add (GTK_CONTAINER (opening_window), vbox1);

/*
   Start the processing
*/
    gtk_widget_show (opening_window);
    gtk_main ();   
    return 0;
}

/************************************************************
             do_exit.

  This routine is run when the user exits gsceditor
*************************************************************/

void do_exit()
{
    char msg[256];
    do_message(msg, "Exiting gsceditor");
    gtk_main_quit();
    exit(0);
}   

/****************************************************************************/
/*      do_message.c                                                        */
/*                                                                          */
/*  Shows a message type in a message box and waits on "OK".                */
/****************************************************************************/

void do_message(char msgtype[], char msgtext[])
{
    GtkWidget *dialogx;
    GtkWidget *contentx;
    GtkWidget *labelx;

    dialogx = gtk_dialog_new_with_buttons(msgtype,
                                         NULL,
                                    GTK_DIALOG_MODAL,
                          GTK_STOCK_OK,
                                         GTK_RESPONSE_OK,
                          NULL);

    gtk_dialog_set_default_response(GTK_DIALOG(dialogx), GTK_RESPONSE_OK);
    contentx = gtk_dialog_get_content_area (GTK_DIALOG (dialogx));
    labelx = gtk_label_new (msgtext);
    gtk_container_add (GTK_CONTAINER (contentx), labelx);
    gtk_widget_show_all(dialogx);
    gtk_dialog_run(GTK_DIALOG(dialogx));
    gtk_widget_destroy (dialogx);
    return;
}

/**************************************************************/
/*                 get_color.c                                */
/*                                                            */
/*  Displays the color selection wheel and return selection.  */
/**************************************************************/

void get_color()
{
/*– Declare the GTK Widgets used  –*/
     GtkWidget* cdialog = NULL;
     GdkColor* color1;     
     GtkColorSelection *colorsel;

/*- Variable Definitions  -*/
     char tmpstr[256];
     gint response1;

/*- Define and start the color selection dialog  -*/

     cdialog = gtk_color_selection_dialog_new("Select Color For XXXXXX");
/*     gtk_widget_show (cdialog); */
     response1 = gtk_dialog_run (GTK_DIALOG(cdialog));

/*- Handle response from color selection -*/
if (response1 == GTK_RESPONSE_OK)
{
printf("\nSelection was made\n");
/*
*color1 = gtk_color_selection_dialog_get_color_selection
                                                        (GtkColorSelectionDialog *colorsel);

g_print( "%s", gdk_color_to_string(color1));
*/
}
else
{
printf("\nNo selection made\n");
/*- g_print( "No color selected." ); -*/
}
    return;   
}

/**********************************************************
             get_color_ok

  This routine is called when the user clicks on OK in
  the color selection dialog.  Basically, we want to keep
  the last color selected.
***********************************************************/
void get_color_ok()
{
printf("\nAt get_color_ok");
    return;
}

/**********************************************************
             get_color_selected
***********************************************************/

void get_color_selected()
{
printf("\nAt get_color_selected");
    return;
}

/**********************************************************
             yesno.c_gtk 
  This routine prompts the user with the supplied
  text and gives them a choice of yes or no.
  The response is return as true or false.
***********************************************************/

int yesno(char msgtype[], char msgtext[])
{
    GtkWidget *dialogx;
    GtkWidget *labelx;
    GtkWidget *contentx;
    int rtn_response = FALSE;
    gint result=0;

    dialogx = gtk_dialog_new_with_buttons(msgtype, NULL,
                                    GTK_DIALOG_MODAL,
                          GTK_STOCK_OK, GTK_RESPONSE_OK,
                                         GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
                          NULL);
    gtk_window_set_position(GTK_WINDOW(dialogx), GTK_WIN_POS_CENTER);

    gtk_dialog_set_default_response(GTK_DIALOG(dialogx), GTK_RESPONSE_OK);
    contentx = gtk_dialog_get_content_area (GTK_DIALOG (dialogx));
    labelx = gtk_label_new (msgtext);
    gtk_container_add (GTK_CONTAINER (contentx), labelx);   
    result =gtk_dialog_run(GTK_DIALOG(dialogx));

    if (result == GTK_RESPONSE_OK)
    {
        rtn_response = TRUE;
    }
    else
    {
        rtn_response = FALSE;
    }

    gtk_widget_destroy (dialogx);
    return rtn_response;
}


Any help someone could give to an old guy would be greatly appreciated!

Thanks in advance!
Dave ;)


Top
 Profile  
 
 Post subject: Re: I could use some help - C and GTK - color selection
PostPosted: Tue Feb 07, 2012 8:33 am 
Offline

Joined: Mon Feb 06, 2012 8:17 pm
Posts: 4
Perhaps the following code can illustrate a way to set/get color from the dialog (replacing your get_color function):

Code:
void get_color()
{

/*– Declare the GTK Widgets used  –*/

     GtkWidget* cdialog = NULL;
     GdkColor* color1;
     GtkColorSelection *colorsel;

/*- Variable Definitions  -*/

     char tmpstr[256];
     gint response1;

/*- Define and start the color selection dialog  -*/

     cdialog = gtk_color_selection_dialog_new("Select Color For XXXXXX");

/* set color to "#FF5400" in the dialog */
GdkColor col;
gdk_color_parse ("#FF5400",&col);
GtkWidget* sel=gtk_color_selection_dialog_get_color_selection(GTK_COLOR_SELECTION_DIALOG(cdialog));
gtk_color_selection_set_current_color (GTK_COLOR_SELECTION(sel),&col);

/*     gtk_widget_show (cdialog); */
     response1 = gtk_dialog_run (GTK_DIALOG(cdialog));

/*- Handle response from color selection -*/

/* get the color from the dialog */
gtk_color_selection_get_current_color (GTK_COLOR_SELECTION(sel),&col);

if (response1 == GTK_RESPONSE_OK)
{
printf("\nSelection was made\n");
printf("New color: %s\n",gdk_color_to_string(&col));
}
else
{
printf("\nNo selection made\n");
}

/* destroys the dialog */
gtk_widget_destroy(cdialog);

    return;
}


Regards,
Jojo.


Top
 Profile  
 
 Post subject: Re: I could use some help - C and GTK - color selection
PostPosted: Tue Feb 07, 2012 8:55 am 
Offline
Familiar Face

Joined: Mon May 05, 2008 3:38 am
Posts: 12
I'm going to give that a try in just a minute, but I wanted to thank you. I *think* I understand what is going on, but I may post backa question or 2.

Thanks again!
Dave ;)


Top
 Profile  
 
 Post subject: Re: I could use some help - C and GTK - color selection
PostPosted: Tue Feb 07, 2012 10:07 am 
Offline
Familiar Face

Joined: Mon May 05, 2008 3:38 am
Posts: 12
Okay, I got that working except for 1 thing I think might be in error:

- the string printed by gtk color to string function seems to have double of each character that actually shows in the color wheel. For exampe, if the color was E7D100 on the wheel, it prints out as E7E7D1D10000 - double of each character

As you can probably tell, the opening screen is eventually going to have multiple lines, each with a forground color (clickable for selection), a background color (clickable for selelction) and some with have a gradient vert, horz or none button box. I will be loading that screen from values stored in a file, so the buttons will get a background color reflecting the color stored in the file for that parameter. If the user clicks on a button, the color selection box will come up so they can select a new color for that parameter if they want to. So, I *think* I can work all in the GdkColor variable, but can I set a button background to a GdkColor with any type of conversion?


Thanks again!!

Dave ;)


Top
 Profile  
 
 Post subject: Re: I could use some help - C and GTK - color selection
PostPosted: Tue Feb 07, 2012 12:00 pm 
Offline
Never Seen the Sunlight

Joined: Wed Jul 23, 2008 10:31 am
Posts: 2406
Location: Slovenia
Hi.

gdk_color_to_string() function returns "doubled" characters because GdkColor stores color components as 16-bit integers. Usually, color components are represented with numbers 0-255 (in hex, 0xRRGGBB), but within GdkColor they are represented with numbers 0-65535 (in hex, 0xRRRRGGGGBBBB).

gdk_color_parse() will understand both notations (and then some more).

Cheers,
Tadej


Top
 Profile  
 
 Post subject: Re: I could use some help - C and GTK - color selection
PostPosted: Wed Feb 08, 2012 6:07 am 
Offline
Familiar Face

Joined: Mon May 05, 2008 3:38 am
Posts: 12
Okay, so some more dumb questions:

when I return the alpha for opacity, I get a huge number. How do I convert this to 0-255?

if I strncpy the rr, gg and bb pieces out of the string of the color selection, how do I convert each to 0-255?

I'm really quite lost right now - I can see each rr rr gg gg bb bb pair of the selected color (as you said, returned as rrrrggggbbbb) as being hex, but I'm so stupid right now I don't understand - is it just converting the hex pair to decimal, and if so, what type of casting do I use to do that?

Thanks again very much - while it may be simple, it is helping me tremendously, and I can see my project starting to fall together now.

Dave ;)


Top
 Profile  
 
 Post subject: Re: I could use some help - C and GTK - color selection
PostPosted: Wed Feb 08, 2012 8:38 am 
Offline

Joined: Mon Feb 06, 2012 8:17 pm
Posts: 4
anewguy wrote:
when I return the alpha for opacity, I get a huge number. How do I convert this to 0-255?

Divide it by 257. Alpha, as RGB, are from 0 to 65535 in Gtk.
anewguy wrote:
if I strncpy the rr, gg and bb pieces out of the string of the color selection, how do I convert each to 0-255?

Don't use the string representation, but get the R G and B components as 16-bit integers from the GdkColor object (http://developer.gnome.org/gdk/stable/g ... l#GdkColor), and then divide them by 257.

Regards,
Jojo.


Top
 Profile  
 
 Post subject: Re: I could use some help - C and GTK - color selection
PostPosted: Wed Feb 08, 2012 9:24 am 
Offline
Never Seen the Sunlight

Joined: Wed Jul 23, 2008 10:31 am
Posts: 2406
Location: Slovenia
Hi.

Have a look at this sample code that demonstrates how to convert 16-bit numbers to 8-bit. Note that this conversion is not 100% accurate (as you can see, I use only integer arithmetic), but should suffice for most common use (if you're developing photographic software, you better learn more about colors ASAP;).

Code:
#include <gtk/gtk.h>

#define c16to8(num) ((num + 0x80) / 0x101)

static char *
convert_color_and_alpha (GdkColor const *color,
                         guint16         alpha)
{
  return g_strdup_printf ("#%02x%02x%02x%02x",
                          c16to8 (color->red), c16to8 (color->green),
                          c16to8 (color->blue), c16to8 (alpha));
}

int
main (int    argc,
      char **argv)
{
  /* Convert GdkColor + alpha to #rrggbbaa (web) notation. */

  GdkColor color;
  guint16 alpha;
  char *string;

  /* Set initial color and alpha - you'll get those numbers from
   * color selection dialog. */
  color.red   = 0x4e4e;
  color.green = 0x9a9a;
  color.blue  = 0x0606;
  alpha       = 0x7f7f;

  g_print ("Initial color: #%04x%04x%04x%04x\n",
           color.red, color.green, color.blue, alpha);

  /* Now do the conversion */
  string = convert_color_and_alpha (&color, alpha);
  g_print ("New color: %s\n", string);
  g_free (string);

  return 0;
}


Cheers,
Tadej


Top
 Profile  
 
 Post subject: Re: I could use some help - C and GTK - color selection
PostPosted: Wed Feb 08, 2012 9:43 am 
Offline
Familiar Face

Joined: Mon May 05, 2008 3:38 am
Posts: 12
I've been trying to convert to what you are saying, but I'm having a heck of a time. One of my biggest problems is that I don't have a clue what things like:
Code:
gint gdk_color_white (GdkColormap *colormap,  GdkColor *color);
gint gdk_color_black (GdkColormap *colormap, GdkColor *color);
gint gdk_color_parse (const gchar *spec,  GdkColor *color);
gint gdk_color_alloc (GdkColormap *colormap, GdkColor *color);
gint gdk_color_change (GdkColormap *colormap, GdkColor *color);

Get translated to real-world C coding. So the things like you pointed me to I just get frustrated trying to figure out how to use - again, my C being poor.

As an example:
Code:
/* get the color from the dialog */
          gtk_color_selection_get_current_color (GTK_COLOR_SELECTION(sel),&col);
          if (has_opacity)
          {
              color_alpha = gtk_color_selection_get_current_alpha (GTK_COLOR_SELECTION(sel));
          }
          sprintf(color_RR, "%.2X", col->red  /256);
          sprintf(color_GG, "%.2X", col->green/256);
          sprintf(color_RR, "%.2X", col->blue /256);

printf("\nColor:  RR:%s  GG:%s  BB:%s\n", color_RR, color_GG, color_BB);


How I interpreted it should be for my code, gives me the following compilation errors:

Code:
gscedit.c:242:40: error: invalid type argument of ‘->’ (have ‘GdkColor’)
gscedit.c:243:40: error: invalid type argument of ‘->’ (have ‘GdkColor’)
gscedit.c:244:40: error: invalid type argument of ‘->’ (have ‘GdkColor’)

If I remember correctly col in this case is being used as a pointer, and I thought col, as a GdkColor, was really a structure and I'm supposed to be trying to grab the member red, green and blue from that structure.

I'm frustrated because I just don't remember enough about C after all these years.

So as you can see, any help, with a simple explanation of what is being shown, what is being done, would be so greatly appreciated!

Dave ;)


Top
 Profile  
 
 Post subject: Re: I could use some help - C and GTK - color selection
PostPosted: Wed Feb 08, 2012 11:12 am 
Offline

Joined: Mon Feb 06, 2012 8:17 pm
Posts: 4
anewguy wrote:
If I remember correctly col in this case is being used as a pointer, and I thought col, as a GdkColor, was really a structure and I'm supposed to be trying to grab the member red, green and blue from that structure.

That's right: you need col.green instead of col->green.

Jojo.


Top
 Profile  
 
 Post subject: Re: I could use some help - C and GTK - color selection
PostPosted: Wed Feb 08, 2012 12:20 pm 
Offline
Familiar Face

Joined: Mon May 05, 2008 3:38 am
Posts: 12
Yes! That was it! Okay, so I can get a color selection and it's RGB portions, as well as opacity (I'm making that conditional in the program). This entire thing is leading up to an editor for the css for the gnome shell - gnome-shell.css. I'm trying to find something dealing with gnome that will tell me what all the options are, mean, and potential values/conflicts in that css file. For now, just to get started, I'm using this code to build into the editor and at first it will just edit panel colors. Still easier than using a line editor and editing the css file, I think.

Thanks again!

Dave ;)


Top
 Profile  
 
 Post subject: Re: I could use some help - C and GTK - color selection
PostPosted: Thu Feb 09, 2012 10:32 pm 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
By the way performing a division by 257 is needlessly inefficient. As it is not a power of 2, I don't think your c compiler will optimise it. You'll do much better to just take the first byte and throw away the last byte (or by rotating right by 8 bits -- the >> operator in c -- where you can then add in the carry of the last rotated out byte)
e.g.
DBDB = 1101101111011011 rotated with carry becomes
00DB = 0000000011011011 with 1 in the carry. Then adding with carry becomes:
00DC = 0000000011011100
Bitwise operations are always much faster. You do lose the precision from cutting out the lower bits but when you do an integer division this happens anyway (and it should give the same result).


Top
 Profile  
 
 Post subject: Re: I could use some help - C and GTK - color selection
PostPosted: Sat Feb 11, 2012 3:06 pm 
Offline
Familiar Face

Joined: Mon May 05, 2008 3:38 am
Posts: 12
Also, how do I get the fractional represention of opacity - in other words the "a" value of RR-GG-BB-a? I'm able to return the big value of alpha, but don't know a thing about converting it to the fractional representation.

Thanks again - you have been really helpful for me!

Dave ;)


Top
 Profile  
 
 Post subject: Re: I could use some help - C and GTK - color selection
PostPosted: Sat Feb 11, 2012 8:31 pm 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
This one you need to convert to a double before dividing. Alpha is also a guint16 so it goes from 0 to (2^16)-1 (the latter of which you divide by to normalise it to 0-1 -- as you are working with floats the bit shift idea isn't going to work too well -- floats are not represented the same on all platforms as far as I remember)


Top
 Profile  
 
 Post subject: Re: I could use some help - C and GTK - color selection
PostPosted: Thu Feb 16, 2012 5:33 am 
Offline
Familiar Face

Joined: Mon May 05, 2008 3:38 am
Posts: 12
I have to admit that currently I don't have a clue how to do that in C. I also have no idea how to let the user select a gradient and it's start and end points. But, that can come a little later. I have some more basic things to take care of:

I want to be able to show the current color selected for a given option in my program as a button on the screen with the current selected color as the background color for the button widget. I believe I'm having problems in 2 areas:

- the gtk_color_parse as I'm not sure it's actually doing anything

- the gtk_widget_override_background_color since I never see the color in the button

Here is a snip of definition that might be helpful:
Code:
     char css_panel_color[256] = "#ff1364";


Here is the code snippet I don' think is working right:
Code:
     panel_win1 = gtk_window_new (GTK_WINDOW_TOPLEVEL);
     gtk_window_set_title (GTK_WINDOW(panel_win1), "GNOME SHELL CSS FILE EDITOR - PANEL OPTIONS");
     gtk_window_set_default_size(GTK_WINDOW(panel_win1), 640, 480);
     gtk_window_set_position (GTK_WINDOW(panel_win1), GTK_WIN_POS_CENTER);
     g_signal_connect (G_OBJECT (panel_win1), "delete_event",
                       G_CALLBACK (close_window), GTK_CONTAINER(panel_win1));
     g_signal_connect (G_OBJECT (panel_win1), "destroy",
                       G_CALLBACK (close_window), GTK_CONTAINER(panel_win1));


     gtk_container_set_border_width (GTK_CONTAINER(panel_win1), 5);

     wrkbox1 = gtk_vbox_new(FALSE, 5);
     gtk_container_add (GTK_CONTAINER (panel_win1), wrkbox1);
     
     table1 = gtk_table_new(15,10,TRUE);
     label1 = gtk_label_new("Panel Color:");
     label2 = gtk_label_new("Background:");

     gdk_color_parse (css_panel_color, &colorButton);  ******** <---- I don't think this is doing anything ********
     button_Widget = gtk_button_new_with_label("Current Color");
     gtk_widget_override_background_color (button_Widget, GTK_STATE_NORMAL, &colorButton);******** <---- I don't think this is doing anything ********

     panel_background_image_active =  gtk_radio_button_new(NULL);
     gtk_radio_button_set_group(panel_background_image_active,group1);
     panel_background_color_active = gtk_radio_button_new(group1);
     gtk_toggle_button_set_active (GTK_RADIO_BUTTON (panel_background_color_active), TRUE);

     label3 = gtk_label_new("Image:");
     label4 = gtk_label_new("Color:");

     gtk_table_attach (GTK_TABLE(table1), label1, 0,1,0,1,
                       GTK_EXPAND, GTK_SHRINK, 0, 0);
     gtk_table_attach (GTK_TABLE(table1), button_Widget, 1,3,0,1,
                       GTK_EXPAND, GTK_SHRINK, 0, 0);
     gtk_table_attach (GTK_TABLE(table1), label2, 0,1,1,2,
                       GTK_EXPAND, GTK_SHRINK, 0, 0);
     gtk_table_attach (GTK_TABLE(table1),
                       panel_background_image_active,
                       1,2,1,2,
                       GTK_EXPAND,
                       GTK_SHRINK,
                       0, 0);
     gtk_table_attach (GTK_TABLE(table1),
                       panel_background_color_active,
                       1,2,2,3,
                       GTK_EXPAND,
                       GTK_SHRINK,
                       0, 0);
     gtk_table_attach (GTK_TABLE(table1), label3, 2,3,1,2,
                       GTK_EXPAND, GTK_SHRINK, 0, 0);
     gtk_table_attach (GTK_TABLE(table1), label4, 2,3,2,3,
                       GTK_EXPAND, GTK_SHRINK, 0, 0);

     gtk_table_set_row_spacings (GTK_TABLE(table1),3);
     gtk_table_set_col_spacings (GTK_TABLE(table1),3);

     gtk_container_add(GTK_CONTAINER(wrkbox1), table1);

     gtk_widget_show(table1);


It is generating the screen I want, but the "Current Color" box doesn't actually have the background color from the definition.

Any help is always greatly appreciated! I'm making what are big strides to me - most of the gut pieces are there and working, it just a matter of interfacing to them.

Dave ;)


Attachments:
gtk_widget_override_background_color.png
gtk_widget_override_background_color.png [ 17.3 KiB | Viewed 826 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group