++ed by:
Author image Damion K. Wilson


Tk::DockFrame - A multicolumn list widget with sortable & sizeable columns


    use Tk::DockFrame;

    $DockPort = $parent->DockPort();


    $DockFrame = $parent->DockFrame
        '-dock' => $DockPort,
        '-trimcount' => 1,
        '-sensitivity' => 10,
        '-decorate' => 0,
        '-trimgap' => 2

    $DockFrame->Widget (...)->pack();




The two public classes in this module combine to implement a dockable widget subsystem.

Objects of class DockFrame are simple frames which can be made to "float" free as Toplevel widgets or packed as Frames. Dockframes can have any number of direct children but the favored use is to pack a single Frame based child widget and add widgets to that using any geometry manager.

DockPorts are simple frame widgets which must be managed by the packer. They normally have no width or height and are thus rendered invisible. DockFrame children of the same parentage, when dragged over them, will be converted from "floating" Toplevels into Frame widgets rendered within the DockPort, resizing it accordingly.


The DockFrames are now managed WITHIN the DockPorts, therefore any geometry manager can be used with all the widgets described here



-background -borderwidth -relief -bg -width -height



See Tk for details of the standard options.


Name: dock
Class: Dock
Switch: -dock

Used to "dock" a DockFrame to a DockPort. The parameter passed must be a reference to a DockPort and nothing else. If a DockPort is not specified in this manner on creation, then the DockFrame will initially "float" free.

Name: trimcount
Class: TrimCount
Switch: -trimcount

Specifies the number of button trim drag 'handles'. Specifying 0 will prevent attachment/detachment of the DockFrame.

Name: sensitivity
Class: Sensitivity
Switch: -sensitivity

The DockFrame will "dock" when it gets within the specified number of pixels of the DockPort.

Name: decorate
Class: Decorate
Switch: -decorate

Boolean value indicating whether or not to instruct the window manager to add decoration (titlebar, etc) to the undocked DockFrame. It is important to note here that, due to the nature of the event handling, dragging the DockFrame by the titlebar will not cause it to dock.

Name: trimgap
Class: Trimgap
Switch: -trimgap

This option specifies the number of pixels to leave between the "handles" and the first child widget


$DockFrame->dock ($DockPort)

Immediately docks the DockFrame to the specified DockPort


Immediately undocks the DockFrame



Pressing and holding the left mouse button on a DockFrame trim element allows movement of that DockFrame. If the DockFrame is "dragged" over a DockPort, it will "dock" and dragging will cease until the "handle" is released and then selected again.


Damion K. Wilson, dwilson@ibl.bm, http://pwp.ibl.bm/~dkw


Copyright (c) 1999 Damion K. Wilson.

All rights reserved.

This program is free software, you may redistribute it and/or modify it under the same terms as Perl itself.


October 1, 1999: Written to replace experimental Tk::DockingGroup with no legacy support

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 630:

=cut found outside a pod block. Skipping to next block.

Around line 673:

'=item' outside of any '=over'

Around line 678:

You forgot a '=back' before '=head1'