Tkinter "scrollregion" verbosity

Randall Hopper aa8vb at yahoo.com
Sat Sep 18 07:31:58 EDT 1999


Is there a simpler way to get the canvas scroll region than this?

    GETTING THE CANVAS SCROLL REGION:

        region = canvas.cget( 'scrollregion' )
        if not region:
          raise AttributeError, "No scroll region defined for the canvas"

        region = map( string.atof, string.split( region ) )


With Python's normal brevity, it surprised me that this much code was needed.

Randall




More information about the Python-list mailing list