-- ! SpecTcl, by S. A. Uhler --
-- Copyright (c) 1994-1995 Sun Microsystems, Inc. --
-- See the file "license.txt" for information on usage and redistribution
-- of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-->
SpecTcl quick tips
- To create a widget, drag it from the palette onto the grid.
- To select a widget, click on it (or use the arrow keys).
- To configure a widget, select it, then:
- Use the tool-bar - click on a tool-bar item
- Use the option sheet - Double-click on the widget (or key
control-w
).
- Repeat the last change - key
control-.
- To move a widget, drag it to another location.
- To copy a widget, Shift-drag it to another location.
- To Delete a widget, select it,
then hit the
delete
key.
- To change a widgets size, Drag its
row
or column
handle (at the left or top of the canvas)
- To change the span of a widget - select it, and drag its
resize handles past the next grid line.
-
To add a new row or
column - click on a grid line.
- To select a row or column
- Click on the row or column handle
(it will turn
red).
- Click on an empty cell.
- To delete a row or column - select it and key
delete
.
- To change row or column resizeability - select it and
click on it. The arrow shape reflects its resizability.
- To make a sub-grid, create a
frame
widget.
- Use sub-grids when widgets don't align on rows and columns
- Avoid too many (e.g. more than one) levels of sub-grids.
- To test the interface, key
control-t
.
- For a project named foo
- The project is saved in the file foo.ui
- The tcl code is saved in the file foo.ui.tcl
- The procedure is called foo_ui, and is
called with the name of the frame or toplevel it should be
instantiated in.
- If the application code is in a file called foo.tcl,
The application code will be run as part of testing
the interface, and must call
foo_ui
.
- All widgets in an interface are siblings in the
widget hierarchy, and named with the item_name
option.
-
In widget command options, The following substitutions
are made:
- %B
- The base portion of the widget name (e.g.
the part of the name preceding the final ".").
- %R
- The parent of all of the widgets
- %M
- The geometry master for this widget
- %W
- The complete pathname of the widget
-
Additional Tcl code can be inserted into the user interface
procedure after all of the widgets have been created
using the edit code option of the
edit menu.
- To select a widget, click on it.
- To select a row or column, click on its handle.
- To select the nextwidget,
key
right-arrow
.
- To select the previous widget,
key
left-arrow
.
- To enter a sub-frame, key
down-arrow
.
- To enter a parent frame, key
up-arrow
.