Tcl::pTk::Pane(3)

NAME
Tcl::pTk::Pane - A window panner

SYNOPSIS
    use Tcl::pTk::Pane;

    $pane = $mw->Scrolled(Pane, Name => 'fred',
        -scrollbars => 'soe',
    );

    # Add some widgets
    $pane->Label()->pack;
    $pane->Label()->pack;

    # Pack the pane
    $pane->pack;

DESCRIPTION
Tcl::pTk::Pane provides a scrollable frame widget. Once created it can be treated as a frame, except it is scrollable.

Note: This Tcl::pTk Implementation of the Tk::Pane widget. It uses the Tcl/Tk BWidget package ScrollableFrame to approximate the behavoir of the original Tk::Pane widget.

Limitation: This widget doesn't recognize the -gridded and -sticky options of the original Tk::Pane widget. Currently, if these options are ignored.

OPTIONS
This widget has the same options as the Tcl ScrollableFrame widget, which are repeated below.

-areaheight
    Specifies the height for the scrollable area. If zero, then the height of the scrollable area is made just large enough to hold all its children.

-areawidth
    Specifies the width for the scrollable area. If zero, then the width of the scrollable area window is made just large enough to hold all its children.

-constrainedheight
    Specifies whether or not the scrollable area should have the same height of the scrolled window. If true, vertical scrollbar is not needed.

-constrainedwidth
    Specifies whether or not the scrollable area should have the same width of the scrolled window. If true, horizontal scrollbar is not needed.

-height Specifies the desired height for the window in pixels.
-width Specifies the desired width for the window in pixels.
-xscrollincrement See xscrollincrement option of canvas widget.
-yscrollincrement See yscrollincrement option of canvas widget.

METHODS

$pane->frame()
    Returns the Frame widget that are scrolled. Equivalent to the getframe method of the wrapped ScrollableFrame widget.

$pane->see($widget ?,options?)
    Adjusts the view so that $widget is visible. Valid Options are described below. options-value pairs can be passed, each option-value pair must be one of the following

    Note: For compatibility with the original Tk::Pane widget, the -anchor option translated to the -horiz and -vert options of the wrapped ScrollableFrame widget.

    -anchor => anchor
        Specifies how to make the widget visable. If not given then as much of the widget as possible is made visable.

        Possible values are n, s, w, e, nw, ne, sw and se. This will cause an edge on the widget to be aligned with the corresponding edge on the pane. for example nw will cause the top left of the widget to be placed at the top left of the pane. s will cause the bottom of the widget to be placed at the bottom of the pane, and as much of the widget as possible made visable in the x direction.

    ?vert? ?horz?
        vert and horz specify which part of widget must be preferably visible, in case where widget is too tall or too large to be entirely visible. vert must be top (the default) or bottom, and horz must be left (the default) or right. If vert or horz is not a valid value, area is not scrolled in this direction.

$pane->xview
    Returns a list containing two elements, both of which are real fractions between 0 and 1. The first element gives the position of the left of the window, relative to the Pane as a whole (0.5 means it is halfway through the Pane, for example). The second element gives the position of the right of the window, relative to the Pane as a whole.

$pane->xview($widget)
    Adjusts the view in the window so that widget is displayed at the left of the window.

$pane->xview(moveto => fraction)
    Adjusts the view in the window so that fraction of the total width of the Pane is off-screen to the left. fraction must be a fraction between 0 and 1.

$pane->xview(scroll => number, what)
    This command shifts the view in the window left or right according to number and what. Number must be an integer. What must be either units or pages or an abbreviation of one of these. If what is units, the view adjusts left or right by number*10 screen units on the display; if it is pages then the view adjusts by number screenfuls. If number is negative then widgets farther to the left become visible; if it is positive then widgets farther to the right become visible.

$pane->yview
    Returns a list containing two elements, both of which are real fractions between 0 and 1. The first element gives the position of the top of the window, relative to the Pane as a whole (0.5 means it is halfway through the Pane, for example). The second element gives the position of the bottom of the window, relative to the Pane as a whole.

$pane->yview($widget)
    Adjusts the view in the window so that widget is displayed at the top of the window.

$pane->yview(moveto => fraction)
    Adjusts the view in the window so that fraction of the total width of the Pane is off-screen to the top. fraction must be a fraction between 0 and 1.

$pane->yview(scroll => number, what)
    This command shifts the view in the window up or down according to number and what. Number must be an integer. What must be either units or pages or an abbreviation of one of these. If what is units, the view adjusts up or down by number*10 screen units on the display; if it is pages then the view adjusts by number screenfuls. If number is negative then widgets farther up become visible; if it is positive then widgets farther down become visible.

AUTHOR
Original Code: Graham Barr <gbarr@pobox.com>

COPYRIGHT
Original Code: Copyright (c) 1997-1998 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.