Pad++ Reference Manual
pad [pathName [options]]
pad
command creates a new window (given by the pathName
argument) and makes it into a Pad++ widget. If no pathName
is specified, a unique top-level window name will be generated. Additional options may be specified on the command line or in the option database to configure aspects of the Pad++. The pad
command returns the name of the created window. At the time this command is invoked, there must not exist a window named pathName
, but pathName
's parent must exist.Once a Pad++ widget is created, there are five ways of writing Tcl code for it. They are:
-width
and -height
control the geometry of the widget.
pad .pad
creates a widget named .pad
, and a command named .pad
. For example, to find out what the current view on the pad widget is, use the getview
command with: .pad getview
.
create
sub-command. For example, .pad create line 0 0 10 10
creates a line from the origin to the point (10, 10).
itemconfigure
sub-command. For example, supposing that the previous line had an id of 2, we could change its pen color and width with: .pad itemconfigure 2 -pen red -penwidth 5
This version of Pad++ works with either Tcl7.5/Tk4.1 or Tcl7.6/Tk4.2.
Note that in this reference manual, optional parameters are listed in square brackets, [...]. While this is traditional for reference documentation, the Tcl/Tk documentation uses ?...? to denote optional parameters in order to avoid confusion with the meaning of [...] in the Tcl language. We decided to risk the confusion with Tcl for the increased clarity of square brackets.
Copyright Computer Science Department, The University of New Mexico