::UnselectLastEntry
This command deselects the last mdl3StateEntry widget that the user has selected. The value in the last widget will be saved to the model depending on arguments passed in.
Syntax
::model::mdl3StateEntry::UnselectLastEntry path bOnlyIfActivated bForce
Application
MotionView Tcl GUI
Description
This command deselects the last mdl3StateEntry widget that the user has selected. The value in the last widget will be saved to the model depending on arguments passed in.
Inputs
- path
- This argument take either of two forms. This argument determines the widget whose
Activated status is used in conjunction with the bOnlyIfActivated
argument below.
- Full path to the mdl3StateEntry widget of interest. The path argument is the return value of the model::mdl3StateEntry procedure used to create an mdl3StateEntry.
- Empty string, "". When an empty string is specified for this argument then the widget of interest is whichever mdl3StateEntry widget the user selected last.
- bOnlyIfActivated
- Boolean parameter:
- True
- The last widget will be deselected only if the widget in the path parameter is currently active.
- False
- The last widget will always be deselected.
- bForce
- Boolen parameter:
- True
- The value in the last widget selected will be saved to the model.
- False
- The value in the last widget selected will NOT be saved to the model.
Example
To select 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::UnselectLastEntry $stEntry false false
entPnt ReleaseHandle
Errors
Currently, if the bForce argument is set to true and there is no last entry selected then this procedure will cause an error.