::GetCurrentSelection
Syntax
::model::mdlComboBoxDM:GetCurrentSelection path value
Application
MotionView Tcl GUI
Description
This command gets the currently selected entry in an mdlComboBoxDM widget.
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.
- value
- Boolean value, defaults to false if not provided.
- True
- Returns the value of the selection (“DISP” for example).
- False
- Returns the label of the selection (“Displacement” for example).
Example
::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
set value [ ::model::mdlComboBoxDM::GetCurrentSelection $motion true]
entMot ReleaseHandle
Errors
None.