::mdlComboBox

This command creates an mdlComboBox widget that is tied to a list variable.

Syntax

::model::mdlComboBox path entityHandle data args

Application

MotionView Tcl GUI

Description

This command creates an mdlComboBox widget that is tied to a list variable.

Inputs

path
The full path to the newly created widget.
entityHandle
A handle pointing to the entity.
data
A list of strings containing the entry values and entry labels for the entries in the ComboBox drop down. For example: {"Value 1" "Value 2" "Value 3"}.
args
A list of '-' separated flags to configure the ComboBox widget's behavior.

Example

To create an mdlComboBox widget:
::model::GetClientHandle clnt
clnt GetModelHandle mdl
clnt ReleaseHandle
mdl InterpretEntity entCrv Curve crv_0 "\"Curve 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 { "2D Cartesian" "2D Parametric" "3D Cartesian" "3D Parametric"}
set cb [::model::mdlComboBox .dlg.frm.cb entCrv $data -label "Curve type:" ]
grid $cb -row 0 -column 0

entCrv ReleaseHandle

Errors

Returns the path to a mdlComboBox widget if successful, otherwise an error code.