GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TK::AUTOSCROLL (3)

.ds Aq ’

NAME

Tk::Autoscroll - space invaders-like scrolling

CONTENTS

SYNOPSIS



    use Tk::Autoscroll;
    Tk::Autoscroll::Init($widget);



DESCRIPTION

This lets you enable scrolling similar to the one in Microsoft Explorer. Press the middle mouse button and then move the mouse to scroll the widget. A further press on the middle button stops the scrolling.

It is also possible to use the autoscrolling feature for all Scrolled() widgets automatically. To do so, you have to write



    use Tk::Autoscroll as_default;



FUNCTIONS

    Init($widget, [options ...])

Possible options:
-trigger Default value is <Button-2>
-stoptrigger An event to stop autoscrolling. Normally, this is not defined meaning that autoscrolling will stop if Button-2 is pressed again. If -stoptrigger is set to <ButtonRelease-2>, then the user have to hold the middle button down to autoscroll and autoscrolling will stop if the user releases the button.
-speed Values are slow, normal and fast. Default value is normal.
-beforestartcommand, -afterstartcommand, -beforestopcommand, -afterstopcommand Commands which are executed before/after beginning/ending autoscroll operation. Note that only subroutine references are allowed, but not perl/Tk callbacks (i.e. the [ ] notation). The -before callbacks should return true, otherwise the operation is cancelled.
If you want to apply any Init options to all widgets when using as_default, then you can define the global variable @default_args. Example:



    @Tk::Autoscroll::default_args = (-stoptrigger => <ButtonRelease-2>);



    Reset($widget)

Remove the binding, scrolling is not possible anymore.

BUGS

The import() function could be better implemented, i.e. avoiding the duplicate of Scrolled() definition.

Any motion binding for the widget is overwritten.

Reset() should probably restore all used bindings.

SEE ALSO

Tk, Tk::Scrolled

AUTHOR

Slaven Rezic <slaven@rezic.de>

COPYRIGHT

Copyright (c) 1999,2001,2002 Slaven Rezic. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 AUTOSCROLL (3) 2006-09-10

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.