::UpdateCurrentSelection
This command calls the mdlComboBox selection callback function that was specified during creation with the –selectionfunc option.
Syntax
::model::mdlComboBox::UpdateCurrentSelection path
Application
MotionView Tcl GUI
Description
This command calls the mdlComboBox selection callback function that was specified during creation with the –selectionfunc option.
Inputs
- path
- The full path to the mdlComboBox widget of interest. This argument is the return value of the ::model::mdlComboBox procedure used to create an mdlComboBox.
Example
::model::GetClientHandle clnt
clnt GetModelHandle mdl
clnt ReleaseHandle
mdl InterpretEntity entCrv Curve crv_0 "\"Curve 0\""
mdl ReleaseHandle
proc test_combobox_func { args } {
puts "Callback called"
}
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:" -selectionfunc "test_combobox_func" ]
grid $cb -row 0 -column 0
::model::mdlComboBox::UpdateCurrentSelection $cb
entCrv ReleaseHandle
Errors
None.