SDS2 Parametric API
 All Classes Namespaces Functions Variables Pages
List of all members
Tkinter.Variable Class Reference

Class to define value holders for e.g. More...

Inheritance diagram for Tkinter.Variable:
Tkinter.BooleanVar Tkinter.DoubleVar Tkinter.IntVar Tkinter.StringVar

Methods defined here:

def __del__
def __eq__
def __init__
def __str__
def get
def set
def trace_variable
def trace_variable
def trace_vdelete
def trace_vinfo

Detailed Description

Class to define value holders for e.g.

buttons.

Subclasses StringVar, IntVar, DoubleVar, BooleanVar are specializations that constrain the type of the value returned from get().

Constructor & Destructor Documentation

def Tkinter.Variable.__del__ (   args)
 Unset the variable in Tcl.

Reimplemented in Tkinter.StringVar, Tkinter.IntVar, Tkinter.DoubleVar, and Tkinter.BooleanVar.

def Tkinter.Variable.__init__ (   args)
 Construct a variable
 
 MASTER can be given as master widget.
 VALUE is an optional value (defaults to "")
 NAME is an optional Tcl name (defaults to PY_VARnum).
 
 If NAME matches an existing variable and VALUE is omitted
 then the existing value is retained.

Reimplemented in Tkinter.StringVar, Tkinter.IntVar, Tkinter.DoubleVar, and Tkinter.BooleanVar.

Member Function Documentation

def Tkinter.Variable.__eq__ (   args)
 Comparison for equality (==).
 
 Note: if the Variable's master matters to behavior
 also compare self._master == other._master

Reimplemented in Tkinter.StringVar, Tkinter.IntVar, Tkinter.DoubleVar, and Tkinter.BooleanVar.

def Tkinter.Variable.__str__ (   args)
 Return the name of the variable in Tcl.

Reimplemented in Tkinter.StringVar, Tkinter.IntVar, Tkinter.DoubleVar, and Tkinter.BooleanVar.

def Tkinter.Variable.get (   args)
 Return value of variable.

Reimplemented in Tkinter.StringVar, Tkinter.IntVar, Tkinter.DoubleVar, and Tkinter.BooleanVar.

def Tkinter.Variable.set (   args)
 Set the variable to VALUE.

Reimplemented in Tkinter.StringVar, Tkinter.IntVar, Tkinter.DoubleVar, and Tkinter.BooleanVar.

def Tkinter.Variable.trace_variable (   args)
def Tkinter.Variable.trace_variable (   args)
 Define a trace callback for the variable.
 
 MODE is one of "r", "w", "u" for read, write, undefine.
 CALLBACK must be a function which is called when
 the variable is read, written or undefined.
 
 Return the name of the callback.

Reimplemented in Tkinter.StringVar, Tkinter.StringVar, Tkinter.IntVar, Tkinter.IntVar, Tkinter.DoubleVar, Tkinter.DoubleVar, Tkinter.BooleanVar, and Tkinter.BooleanVar.

def Tkinter.Variable.trace_vdelete (   args)
 Delete the trace callback for a variable.
 
 MODE is one of "r", "w", "u" for read, write, undefine.
 CBNAME is the name of the callback returned from trace_variable or trace.

Reimplemented in Tkinter.StringVar, Tkinter.IntVar, Tkinter.DoubleVar, and Tkinter.BooleanVar.

def Tkinter.Variable.trace_vinfo (   args)
 Return all trace callback information.

Reimplemented in Tkinter.StringVar, Tkinter.IntVar, Tkinter.DoubleVar, and Tkinter.BooleanVar.