Re: Newbie question



Quoted by a city of renegade sharks
For `Alessio Zanon <znnalx yahoo it>' 
On Tuesday, 14 October 2003 (16:16):


I'm trying to realize a simple calculator, just to
learn using GTK+ (with anjuta/glade/C).


        Try this:

        gchar *value, *entry_text;

        entry_text = gtk_entry_get_text(GTK_ENTRY(entry));

        value = g_strconcat(entry_text, "1", NULL);
        gtk_entry_set_text(GTK_ENTRY(entry), value);

        g_free(value);


-- 

 Leandro Pereira              (oO)           <leandro linuxmag com br>
                              /||\                  www.mindcrisis.tk

        "O medo é uma coisa boa. Se você não tiver medo, pode
           acabar pulando pela janela" --Keith Richards  




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