Skip to content

Config Class

Construct a config widget with the parent MASTER.

Parameters

NameTypeDescription
mastertkinter.Tk
titlestr
promptstr
confirmcommandCallable
iconstr
theme

Methods

get

Returns an object containing the new config.

add_string

Add a string option to the config

Parameters

NameTypeDescription
namestr
labelstr
requiredbool

add_boolean

Add a boolean (checkbox) option to the config

Parameters

NameTypeDescription
namestr
labelstr
requiredbool

add_integer

Add an integer option to the config

Parameters

NameTypeDescription
namestr
labelstr
minint
maxint
requiredbool

add_float

Add a float option to the config

Parameters

NameTypeDescription
namestr
labelstr
minfloat
maxfloat
requiredbool

add_enum

Add an enum option to the config

Parameters

NameTypeDescription
namestr
labelstr
requiredbool

add_filename

Add a file option to the config

Parameters

NameTypeDescription
namestr
labelstr
requiredbool

add_directory

Add a directory option to the config

Parameters

NameTypeDescription
namestr
labelstr
requiredbool

add_color

Add a color option to the config

Parameters

NameTypeDescription
namestr
labelstr
requiredbool

add_object

Parameters

NameTypeDescription
namestr
labelstr
requiredbool

Example

py
import tkinter

root = tkinter.Tk()
root.mainloop()

Not associated with or approved by Mojang Studios or Microsoft