Technical data
add button
258
-
Simulator Command Reference ModelSim EE/PLUS Reference Manual
add button
The
add button
command adds a user-defined button to the Main window button
bar. New buttons are added to the right end of the bar. You can also add buttons
with a Model
Sim
tool: "The Button Adder" (p230).
Returns the path name of the button widget created.
Syntax
add button
<Text> <Cmd> [Disable | NoDisable] [{option value...}]
Arguments
<Text>
The label to appear on the face of the button. Required.
<Cmd>
The command to be executed when the button is clicked with the left mouse button. To
echo the command and display the return value in the Main window, prefix the command
with the
transcribe
command (p377).
Transcribe
will also echo the results to the
transcript window. Required.
Disable | NoDisable
If Disable, the button will be grayed-out during a run and not active. If NoDisable, the
button will continue to be active during a run. Optional. The default is Disable.
Note:
The
transcribe
command (p377) will not work when the simulator is running, therefore don’t use
transcribe
with NoDisable.
{option value ...}
A list of option-value pairs that will be applied to the button widget. Optional. Any
properties belonging to Tk button widgets may be set. Useful options are foreground color
(-fg), background color (-bg), width (-width) and relief (-relief).
For a complete list of available options, use the configure command addressed to
the newly-created widget. For example:
.controls.button_7 config
Note:
Because the arguments are positional, a Disable | NoDisable option must be specified in order to use
the options argument.