Re: icon and font color???+disabling a button



1- try converting image.ico in pixmap:
in the shell execute: convert image.ico image.xpm.
Then load it as a pixmap.

2- for a label is something like this (and i think also for combo box,
but you have to find the correct struct: fg, bg, base, ecc...):

        label_messaggio = gtk_label_new ("");

        style=gtk_style_new();
        font=gdk_font_load("-bitstream-charter-bold-r-normal-*-16-*-*-*-*-*-iso8859-*");
        if (font != NULL)
                style->font=font;

        cmap = gdk_colormap_get_system();
        gdk_color_parse("red", &color);

        if (!gdk_color_alloc(cmap, &color)) {
        g_error("couldn't allocate colour");
        }

        style->fg[label_messaggio->state]=color;

        gtk_widget_set_style(label_messaggio, style);

        gtk_label_set_text (GTK_LABEL(label_messaggio), messaggio);

4- for disabling button and all other widget:
gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE);
    

    Message: 9
    From: "john" <johnson cyberbabies com>
    To: gtk-app-devel-list gnome org
    Subject: icon and font color???
    Date: Tue, 16 Sep 2003 00:57:45 -0500
    
    hi there,
        1.      i tried to add my own icon to the window in the title bar named
    image.ico it is in the same directory as the executable..but it says cannot
    find pixmap image.ico
    help me in dispaying that icon in my window
        2. how can i change the color of text box in combo box,text entry and a
    label?
        3. i want to display the contents of a file in hexadecimal and in the
    usual character format .i want to dispay both of them simulataneously.i
    chose text widget for displaying the contents that contains scroll
    bars..but i dont know how to update the contents ..is it possible to to it
    with the text widgets?...how to do.
    thanks for help in advance
    john
    
    _____________________________________________
    Free email with personality! Over 200 domains!
    http://www.MyOwnEmail.com
    Looking for friendships,romance and more?
    http://www.MyOwnFriends.com
    
    
    Message: 12
    From: "john" <johnson cyberbabies com>
    To: gtk-app-devel-list gnome org
    Subject: disabling a button
    Date: Tue, 16 Sep 2003 05:27:04 -0500
    
    hi there,
       how should i disable an ordinary command button 
    created with gtk_button_new_...call?
    regards
    john
    
    
    _____________________________________________
    Free email with personality! Over 200 domains!
    http://www.MyOwnEmail.com
    Looking for friendships,romance and more?
    http://www.MyOwnFriends.com
    





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