::SetEntryText

This command sets the displayed value of an mdl3StateEntry widget. The raw value of the widget is not affected. The evaluated value of the entry can be affected depending on the force argument.

Syntax

::model::mdl3StateEntry::SetEntryText path text force

Application

MotionView Tcl GUI

Description

This command sets the displayed value of an mdl3StateEntry widget. The raw value of the widget is not affected. The evaluated value of the entry can be affected depending on the force argument. See below.

Inputs

path
The full path to the mdl3StateEntry of interest. The path argument is the return value of the model::mdl3StateEntry procedure used to create an mdl3StateEntry.
text
The text that will be displayed in the widget.
force
Bool value. Defaults to true. Determine if the evaluated value is over-ridden.
When force is set to true, the displayed entry value is always text:
  • The entry displays the set text instead of the evaluated value.
  • The GetEvalValue procedure returns the set text instead of the evaluated value.
  • The entry displays the set text after the raw value is changed.
  • The entry displays the set text until the UnsetEntryText procedure is called and the raw value is changed.
When force is set to false the displayed entry value is text temporarily:
  • The entry displays the set text instead of the evaluated value.
  • The GetEvalValue procedure returns the evaluated value.
  • The entry displays the evaluated value after the raw value is changed.

Example

To set the entry text of an mdl3StateEntry widget:
model::GetClientHandle clnt
clnt GetModelHandle mdl
clnt ReleaseHandle
mdl InterpretEntity entPnt Point p_0 "\"Point 0\"" 
mdl ReleaseHandle

set dlg [toplevel .dlg]
set frm [frame $dlg.frm -padx 10 -pady 10]
grid $frm -row 0 -column 0 -sticky nesw

set lbl [ label $dlg.frm.lbl -text "X" -width 3 -anchor w ]
grid $lbl -row 0 -column 0 -sticky nws

set stEntry  [model::mdl3StateEntry .dlg.frm.stEntry entPnt "x" ]
grid $stEntry  -row 0 -column 1

model::mdl3StateEntry::SetEntryText $stEntry "Forced Text" 1

entPnt ReleaseHandle

Errors

None.