[Gtk-sharp-list] Trouble with SpinButton Displaying Fixed-Comma Numbers

Jacek Ruzyczka ruzyczka at versanet.de
Sun Dec 9 15:46:36 EST 2007


Hi folks,

I've got some trouble with my spin buttons: I would like to make them display 
fixed-comma numbers...and it isn't working! Instead of the number itself, my 
SpinButton always displays «0.00»...and that's it. Here is the code:

	object cell;

	SpinButton s = new SpinButton(0, 100000.0, 1.0);
	s.Numeric = true;
	s.UpdatePolicy = SpinButtonUpdatePolicy.Always;
	s.Digits = 2;
	s.Text = cell.ToString();

When I fill «cell» with some Decimal value, say (Decimal) 13.5, and run the 
code mentioned above, the spin button still displays «0.0». Why? Thank you 
for your comments.

NB: I've also tried out the «value» property of the spin button, but the 
result is exactly the same. :-(

Regards
Jacek Rużyczka
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20071209/7c1f8712/attachment.bin 


More information about the Gtk-sharp-list mailing list