func_sketch._gui.float_text_input module#

Class of text input field for floating point numbers.

class func_sketch._gui.float_text_input.FloatTextInput(**kwargs)#

Bases: PlainTextInput

Class of text input field for floating point numbers.

_on_text_changed(_instance: object, text: str) None#

Update the value when the text is changed to a valid float.

Parameters:
  • _instance (object) – Instance of the event.

  • text (str) – New text.

_on_value_changed(_instance: object, value: float) None#

Update the text when the value is changed.

Parameters:
  • _instance (object) – Instance of the event.

  • value (float) – New value.

_update_error_color(_instance: object, is_valid: bool) None#

Change the background color depending on the validity.

Parameters:
  • _instance (object) – Instance of the event.

  • is_valid (bool) – Whether the current text is a valid float.

is_valid#

Whether the current text is a valid float.

value#

Value of the floating-point number represented by the text input field.