Diálogos pre-diseñados para interactuar con dispositivos del ordenador
tkinter
incluye los módulos colorchooser
, commondialog
, dialog
, filedialog
, messagebox
y simpledialog
.
Módulo commondialog
La consola interactiva de Python responde a import tkinter.commondialog as cd; help(cd)
con:
Help on module tkinter.commondialog in tkinter:
NAME
tkinter.commondialog
MODULE REFERENCE
https://docs.python.org/3.6/library/tkinter.commondialog
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
# base class for tk common dialogues
#
# this module provides a base class for accessing the common
# dialogues available in Tk 4.2 and newer. use filedialog,
# colorchooser, and messagebox to access the individual
# dialogs.
#
# written by Fredrik Lundh, May 1997
#
CLASSES
builtins.object
Dialog
class Dialog(builtins.object)
| Methods defined here:
|
| __init__(self, master=None, **options)
| Initialize self. See help(type(self)) for accurate signature.
|
| show(self, **options)
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| command = None
DATA
ACTIVE = 'active'
ALL = 'all'
ANCHOR = 'anchor'
ARC = 'arc'
BASELINE = 'baseline'
BEVEL = 'bevel'
BOTH = 'both'
BOTTOM = 'bottom'
BROWSE = 'browse'
BUTT = 'butt'
CASCADE = 'cascade'
CENTER = 'center'
CHAR = 'char'
CHECKBUTTON = 'checkbutton'
CHORD = 'chord'
COMMAND = 'command'
CURRENT = 'current'
DISABLED = 'disabled'
DOTBOX = 'dotbox'
E = 'e'
END = 'end'
EW = 'ew'
EXCEPTION = 8
EXTENDED = 'extended'
FALSE = 0
FIRST = 'first'
FLAT = 'flat'
GROOVE = 'groove'
HIDDEN = 'hidden'
HORIZONTAL = 'horizontal'
INSERT = 'insert'
INSIDE = 'inside'
LAST = 'last'
LEFT = 'left'
MITER = 'miter'
MOVETO = 'moveto'
MULTIPLE = 'multiple'
N = 'n'
NE = 'ne'
NO = 0
NONE = 'none'
NORMAL = 'normal'
NS = 'ns'
NSEW = 'nsew'
NUMERIC = 'numeric'
NW = 'nw'
OFF = 0
ON = 1
OUTSIDE = 'outside'
PAGES = 'pages'
PIESLICE = 'pieslice'
PROJECTING = 'projecting'
RADIOBUTTON = 'radiobutton'
RAISED = 'raised'
READABLE = 2
RIDGE = 'ridge'
RIGHT = 'right'
ROUND = 'round'
S = 's'
SCROLL = 'scroll'
SE = 'se'
SEL = 'sel'
SEL_FIRST = 'sel.first'
SEL_LAST = 'sel.last'
SEPARATOR = 'separator'
SINGLE = 'single'
SOLID = 'solid'
SUNKEN = 'sunken'
SW = 'sw'
TOP = 'top'
TRUE = 1
TclVersion = 8.6
TkVersion = 8.6
UNDERLINE = 'underline'
UNITS = 'units'
VERTICAL = 'vertical'
W = 'w'
WORD = 'word'
WRITABLE = 4
X = 'x'
Y = 'y'
YES = 1
wantobjects = 1
FILE
~/anaconda3/lib/python3.6/tkinter/commondialog.py
Define la clase Dialog
, base de todos los diálogos definidos en tkinter
.
Módulo colorchooser
La consola interactiva de Python responde a import tkinter.colorchooser as cch; help(cch)
con:
Help on module tkinter.colorchooser in tkinter:
NAME
tkinter.colorchooser
MODULE REFERENCE
https://docs.python.org/3.6/library/tkinter.colorchooser
The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.
DESCRIPTION
# tk common color chooser dialogue
#
# this module provides an interface to the native color dialogue
# available in Tk 4.2 and newer.
#
# written by Fredrik Lundh, May 1997
#
# fixed initialcolor handling in August 1998
#
CLASSES
tkinter.commondialog.Dialog(builtins.object)
Chooser
class Chooser(tkinter.commondialog.Dialog)
| Ask for a color
|
| Method resolution order:
| Chooser
| tkinter.commondialog.Dialog
| builtins.object
|
| Data and other attributes defined here:
|
| command = 'tk_chooseColor'
|
| ----------------------------------------------------------------------
| Methods inherited from tkinter.commondialog.Dialog:
|
| __init__(self, master=None, **options)
| Initialize self. See help(type(self)) for accurate signature.
|
| show(self, **options)
|
| ----------------------------------------------------------------------
| Data descriptors inherited from tkinter.commondialog.Dialog:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
FUNCTIONS
askcolor(color=None, **options)
Ask for a color
FILE
~/anaconda3/lib/python3.6/tkinter/colorchooser.py
Sólo define la función askcolor,
que lanza el diálogo de selección de color del sistema operativo. Mediante el parámetro color
se puede indicar el color seleccionado por defecto en el diálogo.