::GetValue

This command returns the state of a CheckBox widget.

Syntax

::model::mdlCheckBox::GetValue path

Application

MotionView Tcl GUI

Description

This command returns the state of a CheckBox widget.

Inputs

path
The full path to the CheckBox of interest. The path argument is the return value of the ::model::mdlCheckBox procedure used to create a CheckBox.

Example

To get the value of a CheckBox:
::model::GetClientHandle clnt
clnt GetModelHandle mdl
clnt ReleaseHandle
mdl InterpretEntity mrk Marker m_0 "\"Marker 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 chk_box [::model::mdlCheckBox .dlg.frm.chk_box mrk "floating" -label "Floating" \
            -enable true  ]
grid $chk_box -row 0 -column 0 

if { [::model::mdlCheckBox::GetValue $check_box] } {
   # The CheckBox is checked
   puts "CheckBox is checked"
} else {
   # The CheckBox is Unchecked
   puts "CheckBox is unchecked"

}

mrk ReleaseHandle

Errors

Returns ‘1’ if the CheckBox is checked, ‘0’ if it is not.