Table of contents > Appendix: Widget presets

Appendix: Widget presets

Here we present a list of strings that can be used as the type hint in parameters to define specific widgets with specific configurations without having to type all the widget definition by yourself.

Preset (string) Resulting widget
text a text display widget
text_string same as above
python_literal a literal entry
python_multiline_literal a literal display
python_literal_string a string entry that only allows a string representing a python literal
python_literal_text_string a text display that only allows a string representing a python literal
non_negative_int or non_negative_integer or natural_number an intfloat entry that only allows integers >= 0
non_negative_int_or_none or non_negative_integer_or_none or natural_number_or_none same as above, but allows None as well
positive_int or positive_integer an intfloat entry that only allows integers >= 1
positive_int_or_none or positive_integer_or_none same as above, but allows None as well
path a path preview widget
file same as above
filepath same as above
directory same as above
dirpath same as above
text_path a text preview widget
text_file_path same as above
text_filepath same as above
image_path an image preview widget
image_file_path same as above
image_filepath same as above
font_path a font preview widget
font_file_path same as above
font_filepath same as above
audio_path an audio preview widget
audio_file_path same as above
audio_filepath same as above
video_path a video preview widget
video_file_path same as above
video_filepath same as above

In the future, more presets should be defined to make your life even easier.

Table of contents