::UpdateCurrentSelection
This command sets the currently selected entry in an mdlComboBoxDM widget from the value of its associated data member in the model.
Syntax
::model::mdlComboBoxDm:UpdateCurrentSelection path
Application
MotionView Tcl GUI
Description
This command sets the currently selected entry in an mdlComboBoxDM widget from the value of its associated data member in the model.
Inputs
- path
- The full path to the mdlComboBoxDM of interest. This argument is the return value of the ::model::mdlComboBoxDM procedure used to create an mdlComboBoxDM.
Example
To set the current selection of an mdlComboBoxDM widget from its data
member:
::model::GetClientHandle clnt
clnt GetModelHandle mdl
clnt ReleaseHandle
mdl InterpretEntity entMot Motion mot_0 "\"Motion 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 data { "DISP" "Displacement" "VEL" "Velocity" "ACCL" "Acceleration" }
set motion [::model::mdlComboBoxDM .dlg.frm.motion entMot "itype" $data -label "Type:"]
grid $motion -row 0 -column 0
::model::mdlComboBoxDm::UpdateCurrentSelection $motion
entMot ReleaseHandle
Errors
None.