Re: Passing a gint to a label...



"G.Gabriele" wrote:
> 
> Hi all,
> 
> I need to put in a label a gint value...
> 
> void pass-help (gint value)
> {
>     gtk_label_set_text( GTK_LABEL(label),  value);
> }
> 
> How could I do that ?
>
Maybe this way : 
void pass-help (gint value)
{
gchar * buffer;
buffer = (gchar *)g_malloc(sizeof(value));
g_snprintf(buffer,sizeof(value),"%d",value);
g_free(buffer);
}
> Thanks,
> G.Gabriele
> 
> --
> + g.gabriele@europe.com ---------------+
> |                               Linux  |
> +---------------- the free philosophy -+
> 
> _______________________________________________
> gtk-list mailing list
> gtk-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-list




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