Flavio> I need to print float numbers in a gtk label and this widget
    Flavio> only accept gchar in your text parameter, I want to know if
    Flavio> exists some type of routine that changes float number in format
    Flavio> a.bcde to char format "a.bcde".

Check out g_snprintf in the glib reference manual (section: String Utility
Functions).  I believe you call it pretty much like you would sprintf, with
the added safety feature that you provide the length of the output buffer so
it doesn't scribble past the end of it:

    g_snprintf(buf, len_buf-1, "%6.4f", myfloat);

-- 
Skip Montanaro ([EMAIL PROTECTED])
(847)971-7098

_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to