hwtk::splitframe
Contains one or more frames, separated by horizontal and/or vertical dividers. The dividers can be repositioned by clicking on them and dragging the mouse.
Format
hwtk::splitframe - pathName ?option value? …
Standard Options
- -clientdata
- Database name: clientData
- -cursor
- Database name: cursor
- -height
- Database name: height
- -help
- Database name: help
- -helpcommand
- Database name: helpcommand
- -width
- Database name: width
Widget Specific Options
- -orient
- Database name: orient
- -refreshondrag
- Database name: refreshondrag
- -sashcommand
- Database name: sashcommand
- -showbutton
- Database name: showbutton
Widget Commands
- pathName configure ?option? ?value option value …?
- Query or modify the configuration options of the widget. If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. If option is specified with no value, then the command returns a list describing the named option: the elements of the list are the option name, database name, database class, default value, and current value. If no option is specified, returns a list describing all of the available options for pathName.
- pathName cget option
- Returns the current value of the configuration option given by option.
- pathName identify element x y
- Returns the name of the element under the point given by x and y, or an empty string if the point does not lie within any element. x and y are pixel coordinates relative to the widget. Some widgets accept other identify subcommands.
- pathName instate statespec ?script?
- Test the widget’s state. If script is not specified, returns 1 if the
widget state matches statespec and 0 otherwise. If script is specified,
equivalent to
if{[pathNameinstatestateSpec]}script
- pathName state ?stateSpec?
- Modify or inquire widget state. If stateSpec is
present, sets the widget state: for each flag in
stateSpec, sets the corresponding flag or clears it
if prefixed by an exclamation point. Returns a new state spec indicating
which flags were changed:
will restore pathName to the original state. If stateSpec is not specified, returns a list of the currently-enabled state flags.setchanges[pathNamestatespec]
pathNamestate$changes
- pathName add subwindow
- Adds a pane to the splitframe.
- pathName forget pane
- Removes/unmanages the specified pane.
- pathName hidepane pane
- Hides the specified pane.
- pathName insert pos subwindow ?arg arg...?
- Inserts a pane into the splitframe, at the position given by pos.
- pathName set ?arg arg …?
- Sets the entry’s value to arg.
- pathName lock arg
- Locks or unlocks the sashes. Locked sashes cannot be repositioned. If arg is true or 1, the sashes will be locked; if arg is false or 0, the sashes will be unlocked.
- pathName pane pane -option ?value …?
- Modifies/returns the options of the specified pane. The behavior of this command is as follows: If -option is not specified, a list of the pane option values is returned. If only one -option is given, the value of that option is returned. If -option/value pairs are specified, the specified options are set to the given values.
- pathName panes
- Returns a list of panes contained in the splitframe widget.
- pathName remove pane
- Removes the given pane from the splitframe widget.
- pathName sashpos index ?arg arg …?
- Positions the sash/divider at the location given by index.
- pathName showpane pane
- Shows the specified pane.
Example
::hwtk::dialog .dlg -title ::hwtk::splitframe
set w [.dlg recess]
set pw1 [hwtk::splitframe $w.pw -orient horizontal]
pack $pw1 -fill both -expand true
frame $pw1.f1
set pw2 [hwtk::splitframe $pw1.pw2 -orient vertical]
set pw3 [hwtk::splitframe $pw2.pw3 -orient horizontal]
frame $pw2.f1
frame $pw3.f1
frame $pw3.f2
pack [label $pw1.f1.11 -text "label 1"]
pack [label $pw2.f1.11 -text "label 2"]
pack [label $pw3.f1.12 -text "label 3"]
pack [label $pw3.f2.12 -text "label 3"]
$pw1 add $pw1.f1
$pw1 add $pw2
$pw2 add $pw2.f1
$pw2 add $pw3
$pw3 add $pw3.f2
.dlg post