nanome.api.ui.text_input module¶
-
class
TextInput
[source]¶ Bases:
nanome._internal.ui.models._TextInput
,nanome.api.ui.ui_base.UIBase
Represents a text input, where the user can input text-
class
HorizAlignOptions
¶ Bases:
enum.IntEnum
Horizontal alignment modes for text.To be used with ui.Label().text_horizontal_align and ui.Button().horizontal_align-
Left
= 0¶
-
Middle
= 1¶
-
Right
= 2¶
-
-
background_color
¶ - The color of the background of this text input
Type: Color
-
number
¶ - Whether or not the input represents a number.Will display the number keyboard if set to true.
Type: bool
-
password
¶ - Whether or not the input represents a password.i.e. will display 123 as *** if true.
Type: bool
-
placeholder_text_color
¶ - Color of the placeholder text
Type: Color
-
register_changed_callback
(func)[source]¶ - Registers a function to be called whenever the text input is changed.The function must take a text input as its only parameter.
Parameters: func – The function that will be called when the text input is changed.
-
register_submitted_callback
(func)[source]¶ - Registers a function to be called whenever the user submits a text input.The function must take a text input as its only parameter.
Parameters: func – The function that will be called when the user submits a text input.
-
text_color
¶ - The color of the input text
Type: Color
-
text_horizontal_align
¶ - The horizontal alignment of the input and placeholder text
Type: HorizAlignOptions
-
class