Technical data
add button
ModelSim EE/PLUS Reference Manual Simulator Command Reference
-
259
Examples
add button pwd {transcribe pwd} NoDisable
Creates a button labeled "pwd" that invokes the
transcribe
command (p377) with the
pwd
Tcl command, and echoes the command and its results to the Main window. The button
remains active during a run.
The pwd button
example is available in
the following DO file:
<install_dir>/
modeltech/examples/
addbutton.do
. You can
run the DO file to add
the pwd button shown
in the illustration, or
modify the file for
different results.
To execute the DO file, select
Macro > Execute Macro
from the Main window
menu bar, or use the
do
command (p302) from the Model
Sim
command line.
add button date {transcribe exec date} Disable {-fg blue -bg yellow
-activebackground red}
Creates a button labeled "date" that echoes the system date to the Main window. The button
is disabled during a run; its colors are: blue foreground, yellow background, and red active
background.
add button doit {run 1000 ns; echo did it} Disable {-underline 1}
Creates a "doit" button and underlines the second character of the label, the "o" of "doit".
.controls.button_7 config -command {run 10000} -bg red
Changes the button command to "run 10000" and changes the button background color to
red.
See also
transcribe
command (p377), and the "The Button Adder" (p230) tool