Wrapper functions for Tcl/Tk. More...
Classes | |
class | BaseWidget |
Internal class. More... | |
class | BitmapImage |
Widget which can display a bitmap. More... | |
class | BooleanVar |
Value holder for boolean variables. More... | |
class | Button |
Button widget. More... | |
class | CallWrapper |
Internal class. More... | |
class | Canvas |
Canvas widget to display graphical elements like lines or text. More... | |
class | Checkbutton |
Checkbutton widget which is either in on- or off-state. More... | |
class | DoubleVar |
Value holder for float variables. More... | |
class | Entry |
Entry widget which allows to display simple text. More... | |
class | Event |
Container for the properties of an event. More... | |
class | Frame |
Frame widget which may contain other widgets and can have a 3D border. More... | |
class | Grid |
Geometry manager Grid. More... | |
class | Image |
Base class for images. More... | |
class | IntVar |
Value holder for integer variables. More... | |
class | Label |
Label widget which can display text and bitmaps. More... | |
class | LabelFrame |
labelframe widget. More... | |
class | Listbox |
Listbox widget which can display a list of strings. More... | |
class | Menu |
Menu widget which allows to display menu bars, pull-down menus and pop-up menus. More... | |
class | Menubutton |
Menubutton widget, obsolete since Tk8.0. More... | |
class | Message |
Message widget to display multiline text. More... | |
class | Misc |
Internal class. More... | |
class | OptionMenu |
OptionMenu which allows the user to select a value from a menu. More... | |
class | Pack |
Geometry manager Pack. More... | |
class | PanedWindow |
panedwindow widget. More... | |
class | PhotoImage |
Widget which can display colored images in GIF, PPM/PGM format. More... | |
class | Place |
Geometry manager Place. More... | |
class | Radiobutton |
Radiobutton widget which shows only one of several buttons in on-state. More... | |
class | Scale |
Scale widget which can display a numerical scale. More... | |
class | Scrollbar |
Scrollbar widget which displays a slider at a certain position. More... | |
class | Spinbox |
spinbox widget. More... | |
class | StringVar |
Value holder for strings variables. More... | |
class | Studbutton |
No documentation available. More... | |
class | Text |
Text widget which can display text in various forms. More... | |
class | Tk |
Toplevel widget of Tk which represents mostly the main window of an application. More... | |
class | Toplevel |
Toplevel widget, e.g. More... | |
class | Tributton |
No documentation available. More... | |
class | Variable |
Class to define value holders for e.g. More... | |
class | Widget |
Internal class. More... | |
class | Wm |
Provides functions for the communication with the window manager. More... | |
class | XView |
Mix-in class for querying and changing the horizontal position of a widget's window. More... | |
class | YView |
Mix-in class for querying and changing the vertical position of a widget's window. More... |
Functions | |
def | At |
def | AtEnd |
def | AtInsert |
def | AtSelFirst |
def | AtSelLast |
def | getboolean |
def | image_names |
def | image_types |
def | mainloop |
def | NoDefaultRoot |
def | Tcl |
Variables | |
string | __version__ = '$Revision$' |
string | ACTIVE = 'active' |
string | ALL = 'all' |
string | ANCHOR = 'anchor' |
string | ARC = 'arc' |
string | BASELINE = 'baseline' |
string | BEVEL = 'bevel' |
string | BOTH = 'both' |
string | BOTTOM = 'bottom' |
string | BROWSE = 'browse' |
string | BUTT = 'butt' |
string | CASCADE = 'cascade' |
string | CENTER = 'center' |
string | CHAR = 'char' |
string | CHECKBUTTON = 'checkbutton' |
string | CHORD = 'chord' |
string | COMMAND = 'command' |
string | CURRENT = 'current' |
string | DISABLED = 'disabled' |
string | DOTBOX = 'dotbox' |
string | E = 'e' |
string | END = 'end' |
string | EW = 'ew' |
int | EXCEPTION = 8 |
string | EXTENDED = 'extended' |
int | FALSE = 0 |
string | FIRST = 'first' |
string | FLAT = 'flat' |
string | GROOVE = 'groove' |
string | HIDDEN = 'hidden' |
string | HORIZONTAL = 'horizontal' |
string | INSERT = 'insert' |
string | INSIDE = 'inside' |
string | LAST = 'last' |
string | LEFT = 'left' |
string | MITER = 'miter' |
string | MOVETO = 'moveto' |
string | MULTIPLE = 'multiple' |
string | N = 'n' |
string | NE = 'ne' |
int | NO = 0 |
string | NONE = 'none' |
string | NORMAL = 'normal' |
string | NS = 'ns' |
string | NSEW = 'nsew' |
string | NUMERIC = 'numeric' |
string | NW = 'nw' |
int | OFF = 0 |
int | ON = 1 |
string | OUTSIDE = 'outside' |
string | PAGES = 'pages' |
string | PIESLICE = 'pieslice' |
string | PROJECTING = 'projecting' |
string | RADIOBUTTON = 'radiobutton' |
string | RAISED = 'raised' |
int | READABLE = 2 |
string | RIDGE = 'ridge' |
string | RIGHT = 'right' |
string | ROUND = 'round' |
string | S = 's' |
string | SCROLL = 'scroll' |
string | SE = 'se' |
string | SEL = 'sel' |
string | SEL_FIRST = 'sel.first' |
string | SEL_LAST = 'sel.last' |
string | SEPARATOR = 'separator' |
string | SINGLE = 'single' |
string | SOLID = 'solid' |
tuple | StringTypes = (<type 'str'>, <type 'unicode'>) |
string | SUNKEN = 'sunken' |
string | SW = 'sw' |
float | TclVersion = 8.5 |
float | TkVersion = 8.5 |
string | TOP = 'top' |
int | TRUE = 1 |
string | UNDERLINE = 'underline' |
string | UNITS = 'units' |
string | VERTICAL = 'vertical' |
string | W = 'w' |
int | wantobjects = 1 |
string | WORD = 'word' |
int | WRITABLE = 4 |
string | X = 'x' |
string | Y = 'y' |
int | YES = 1 |
Wrapper functions for Tcl/Tk.
Tkinter provides classes which allow the display, positioning and control of widgets. Toplevel widgets are Tk and Toplevel. Other widgets are Frame, Label, Entry, Text, Canvas, Button, Radiobutton, Checkbutton, Scale, Listbox, Scrollbar, OptionMenu, Spinbox LabelFrame and PanedWindow.
Properties of the widgets are specified with keyword arguments. Keyword arguments have the same name as the corresponding resource under Tk.
Widgets are positioned with one of the geometry managers Place, Pack or Grid. These managers can be called with methods place, pack, grid available in every Widget.
Actions are bound to events by resources (e.g. keyword argument command) or with the method bind.
Example (Hello, World): import Tkinter from Tkconstants import * tk = Tkinter.Tk() frame = Tkinter.Frame(tk, relief=RIDGE, borderwidth=2) frame.pack(fill=BOTH,expand=1) label = Tkinter.Label(frame, text="Hello, World") label.pack(fill=X, expand=1) button = Tkinter.Button(frame,text="Exit",command=tk.destroy) button.pack(side=BOTTOM) tk.mainloop()
def Tkinter.At | ( | args | ) |
At(args)
def Tkinter.AtEnd | ( | args | ) |
# Indices: # XXX I don't like these -- take them away
def Tkinter.AtInsert | ( | args | ) |
AtInsert(args)
def Tkinter.AtSelFirst | ( | args | ) |
AtSelFirst(args)
def Tkinter.AtSelLast | ( | args | ) |
AtSelLast(args)
def Tkinter.getboolean | ( | args | ) |
Convert true and false to integer values 1 and 0.
def Tkinter.image_names | ( | args | ) |
image_names(args)
def Tkinter.image_types | ( | args | ) |
image_types(args)
def Tkinter.mainloop | ( | args | ) |
Run the main loop of Tcl.
def Tkinter.NoDefaultRoot | ( | args | ) |
Inhibit setting of default root window. Call this function to inhibit that the first instance of Tk is used for windows without an explicit parent window.
def Tkinter.Tcl | ( | args | ) |
Tcl(args)
string Tkinter.__version__ = '$Revision$' |
string Tkinter.ACTIVE = 'active' |
string Tkinter.ALL = 'all' |
string Tkinter.ANCHOR = 'anchor' |
string Tkinter.ARC = 'arc' |
string Tkinter.BASELINE = 'baseline' |
string Tkinter.BEVEL = 'bevel' |
string Tkinter.BOTH = 'both' |
string Tkinter.BOTTOM = 'bottom' |
string Tkinter.BROWSE = 'browse' |
string Tkinter.BUTT = 'butt' |
string Tkinter.CASCADE = 'cascade' |
string Tkinter.CENTER = 'center' |
string Tkinter.CHAR = 'char' |
string Tkinter.CHECKBUTTON = 'checkbutton' |
string Tkinter.CHORD = 'chord' |
string Tkinter.COMMAND = 'command' |
string Tkinter.CURRENT = 'current' |
string Tkinter.DISABLED = 'disabled' |
string Tkinter.DOTBOX = 'dotbox' |
string Tkinter.E = 'e' |
string Tkinter.END = 'end' |
string Tkinter.EW = 'ew' |
int Tkinter.EXCEPTION = 8 |
string Tkinter.EXTENDED = 'extended' |
int Tkinter.FALSE = 0 |
string Tkinter.FIRST = 'first' |
string Tkinter.FLAT = 'flat' |
string Tkinter.GROOVE = 'groove' |
string Tkinter.HIDDEN = 'hidden' |
string Tkinter.HORIZONTAL = 'horizontal' |
string Tkinter.INSERT = 'insert' |
string Tkinter.INSIDE = 'inside' |
string Tkinter.LAST = 'last' |
string Tkinter.LEFT = 'left' |
string Tkinter.MITER = 'miter' |
string Tkinter.MOVETO = 'moveto' |
string Tkinter.MULTIPLE = 'multiple' |
string Tkinter.N = 'n' |
string Tkinter.NE = 'ne' |
int Tkinter.NO = 0 |
string Tkinter.NONE = 'none' |
string Tkinter.NORMAL = 'normal' |
string Tkinter.NS = 'ns' |
string Tkinter.NSEW = 'nsew' |
string Tkinter.NUMERIC = 'numeric' |
string Tkinter.NW = 'nw' |
int Tkinter.OFF = 0 |
int Tkinter.ON = 1 |
string Tkinter.OUTSIDE = 'outside' |
string Tkinter.PAGES = 'pages' |
string Tkinter.PIESLICE = 'pieslice' |
string Tkinter.PROJECTING = 'projecting' |
string Tkinter.RADIOBUTTON = 'radiobutton' |
string Tkinter.RAISED = 'raised' |
int Tkinter.READABLE = 2 |
string Tkinter.RIDGE = 'ridge' |
string Tkinter.RIGHT = 'right' |
string Tkinter.ROUND = 'round' |
string Tkinter.S = 's' |
string Tkinter.SCROLL = 'scroll' |
string Tkinter.SE = 'se' |
string Tkinter.SEL = 'sel' |
string Tkinter.SEL_FIRST = 'sel.first' |
string Tkinter.SEL_LAST = 'sel.last' |
string Tkinter.SEPARATOR = 'separator' |
string Tkinter.SINGLE = 'single' |
string Tkinter.SOLID = 'solid' |
tuple Tkinter.StringTypes = (<type 'str'>, <type 'unicode'>) |
string Tkinter.SUNKEN = 'sunken' |
string Tkinter.SW = 'sw' |
float Tkinter.TclVersion = 8.5 |
float Tkinter.TkVersion = 8.5 |
string Tkinter.TOP = 'top' |
int Tkinter.TRUE = 1 |
string Tkinter.UNDERLINE = 'underline' |
string Tkinter.UNITS = 'units' |
string Tkinter.VERTICAL = 'vertical' |
string Tkinter.W = 'w' |
int Tkinter.wantobjects = 1 |
string Tkinter.WORD = 'word' |
int Tkinter.WRITABLE = 4 |
string Tkinter.X = 'x' |
string Tkinter.Y = 'y' |
int Tkinter.YES = 1 |