setDigits

open fun setDigits(digits: Int)

Sets the number of decimal places that are displayed in the value.

Also causes the value of the adjustment to be rounded to this number of digits, so the retrieved value matches the displayed one, if property@GtkScale:draw-value is true when the value changes. If you want to enforce rounding the value when property@GtkScale:draw-value is false, you can set property@GtkRange:round-digits instead.

Note that rounding to a small number of digits can interfere with the smooth autoscrolling that is built into GtkScale. As an alternative, you can use method@Gtk.Scale.set_format_value_func to format the displayed value yourself.

Parameters

digits

the number of decimal places to display, e.g. use 1 to display 1.0, 2 to display 1.00, etc