Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
When initially, setting up a spinbutton with a text value (ie .Numeric = false and .Text = "some text") its entry will display 0.
Setting text afterwards works fine and, as the currently used workaround, having an expose callback running last that re-set the text value to itself works so something must be happening in the layout/expose machinery that overwrites the entry final text.
When the widget is first realized and there is nothing connected to the 'output' signal (the one allowing to translate between numbers and strings in the output), GtkSpinButton is basically just relying on the default output generator, which takes the internal adjustment value and prints it, that's why you get the default 0.0 value there.
The lack of a proper output processor method connected to the signal is probably the real problem here. Although, as it is fine to set the text value afterwards even without this output processor method, it probably is a good idea to also allow to set it initially before the widget is realized.
The required change should just be something like this (in gtk_spin_button_realize()):
- if (return_val == FALSE)
+ if (return_val == FALSE && !gtk_entry_get_text (GTK_ENTRY (spin_button))
Will open a bug upstream and suggest the change there.
This patch is already in gtk-2-24, could be added to the GtkSharp builds now:
This bug should be closed as FIXED I suppose, we are using the upstream fix.
Looks like this should be closed.