#!/usr/local/bin/python
"""A test application frame providing a canvas as the main widget of the app.
"""
import Tkinter
import Pmw
import sys, os, string
import Canvas
import math
import colormath
import GuiAppD
class CanvasTestApp(GuiAppD.GuiAppD):
appname = 'Test Canvas'
canvas_width = 500
canvas_height = 500
def createInterface(self):
self.scrolledCanvas = self.createcomponent('canvas', (), None,
Pmw.ScrolledCanvas,
(self.interior(),),
#bg='grey',
hull_relief=Tkinter.SUNKEN,
hull_bd=2,
#width = self.canvas_width,
#height = self.canvas_height,
)
self.scrolledCanvas.pack(
side=Tkinter.TOP,
expand=Tkinter.YES,
fill=Tkinter.BOTH
)
self.canvas = self.scrolledCanvas.component('canvas')
self.createCanvasObjects()
|