::mdlComboBoxDM
This command creates an mdlComboBoxDM widget that is tied to a data member of an existing entity in the model.
Syntax
::model::mdlComboBoxDM path entityHandle dm data args
Application
MotionView Tcl GUI
Description
This command creates an mdlComboBoxDM widget that is tied to a data member of an existing entity in the model.
Inputs
- path
- The full path to the mdlComboBoxDM widget of interest.
- entityHandle
- A handle pointing to the entity that contains the data member.
- dm
- The name of the data member that will hold the value.
- data
- A list of strings containing the entry values and entry labels for the entries in the ComboBox drop down. For example: {" VAL1" "Value 1 Label" "VAL2" "Value 2 Label" "VAL3" "Value 3 Label"}.
- args
- A list of '-' separated flags to configure the mdlComboBoxDM widget's behavior.
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
entMot ReleaseHandle
Errors
Returns the path to a mdlComboBoxDM widget if successful, otherwise an error code.