Documentation‎ > ‎Containers‎ > ‎

    gnocl::scrolledWindow

    A window which adds scrollbars to its child.

    Synopsis

    gnocl::scrolledWindow [-option value...]

    Screenshot


    Options

    -borderWidth integer or one of small, normal or big
    Space in pixel between the children and the border of the widget.
    -child widget-ID
    Widget ID of the child.
    -data string
    User defined data which can be retrieved via the cget subcommand.
    -name string
    Name of the widget, can be used to set options in an rc file.
    -onDestroy string (default: "")
    Tcl command which is executed if the widget is destroyed. Before evaluation the following percent strings are substituted:

    %w    widget name
    -onScroll string (default: "")
    Tcl script which is executed if the widget is scrolled. Before evaluation the following percent strings are substituted:

    %w     widget name
    %x      mouse pointer x coordinate
    %y      mouse pointer y coordinate
    %X
        mouse pointer x screen coordinate
    %Y     mouse pointer y screen coordinate
    %s
          state of buttons and modifiers (bitmask)
    %d      direction of motion
    %g      widget glade name

    -scrollbar one of always, never or automatic (default: automatic)
    When to show scrollbars. If the value is a list of two elements, the first value is for the horizontal scrollbar and the second value for the vertical scrollbar.
    -sensitive boolean (default: 1)
    Whether or not the item is sensitive to user input.
    -visible boolean (default: 1)
    Whether or not the item is visible.
    -xLower float
    This is a read-only option which returns the lower limit in horizontal direction.
    -xPageSize float
    This is a read-only option which returns the page size horizontal direction.
    -xUpper float
    This is a read-only option which returns the upper limit in horizontal direction.
    -xValue float
    Value in horizontal direction.
    -yLower float
    The same as xLower, but in vertical direction.
    -yPageSize float
    The same as xPageSize, but in vertical direction.
    -yUpper float
    The same as xUpper, but in vertical direction.
    -yValue float
    The same as xValue, but in vertical direction.

    Description

    The scrolledWindow widget adds scrollbar to its child.

    Commands

    id cget option
    Returns the value for one option. The option may have any of the values accepted by configure.
    id configure [-option value...]
    Configures the widget. Option may have any of the values accepted on creation of the widget.
    id delete
    Deletes the widget and the associated tcl command.

    Example

    set box [gnocl::box -orientation vertical]

    foreach el {1 2 3 4 5 6} {
    $box add [gnocl::button -text "Button $el"]
    }

    set scrollWin [gnocl::scrolledWindow -child $box]


    gnocl::window /
        -title "ScrolledWindow" /
        -child $scrollWin /
        -defaultWidth 200


    Comments

    Sections