HyperWorks Tools

hwtk::splitframe

hwtk::splitframe

Previous topic Next topic No expanding text in this topic  

hwtk::splitframe

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

NAME

hwtk::splitframe -

 

DESCRIPTION

The hwtk::splitframe widget 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.

 

SYNOPSIS

hwtk::splitfrmae - pathName ?option value? ...

 

STANDARD OPTIONS

-clientdata, clientData, ClientData

-height, height, Height

-help, help, Text

-helpcommand, helpcommand, Command

-width, width, Width

 

WIDGET-SPECIFIC OPTIONS

Command-Line Name: -orient

Database Name: orient

Database Class: Orient

Orientation of the splitframe’s divider. Can be horizontal or vertical.

 

Command-Line Name: -refreshondrag

Database Name: refreshondrag

Database Class: RefreshOnDrag

Designates whether the frame should be refreshed when a divider is repositioned by dragging. A value of 1 results in a refresh; a value of 0 does not.

 

Command-Line Name: -sashcommand

Database Name: sashcommand

Database Class: Command

Command to be invoked whenever the sash is moved/repositioned. The command can be registered by the user to get the callback whenever the sash is moved.

 

WIDGET COMMAND

In addition to the standard configure, cget, identify, instate, and state commands, splitframe supports the following widget commands:

 

pathName add subwindow ?arg arg ...?

 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 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.

 

 

EXAMPLES

 

# get preview frame

set w [hwtk::demo::getpreviewframe]

 

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.l1 -text "label 1"]

pack [label $pw2.f1.l1 -text "label 2"]

pack [label $pw3.f1.l2 -text "label 3"]

pack [label $pw3.f2.l2 -text "label 3"]

 

$pw1 add $pw1.f1

$pw1 add $pw2

$pw2 add $pw2.f1

$pw2 add $pw3

$pw3 add $pw3.f1

$pw3 add $pw3.f2