ScrolledCanvas/ScrolledText

L

lekin2

So what the heck is going on. I have a Pmw.ScrollingCanvas and inside
I put a Pmw.ScrollingText and that all works but I can't get it to
scroll. I was thinking I needed an event like:

self.sc = Pmw.ScrolledCanvas(parent,
borderframe = 5,
labelpos = 'n',
usehullsize = 1,
hull_width = 700,
hull_height = 500,
hscrollmode = 'static',
vscrollmode = 'static',)

self._title = Pmw.ScrolledText(self.sc.interior(),
labelpos = 'w',
text_wrap='word',
usehullsize=1,
hull_height= 50,
hull_width=500)
titleVal = "Equation of state for %s" % (materialName)
self._title.insert(1.0, titleVal)
self._title.component("label").config(text="Title:")

self.sc.component('canvas').bind('<Button-1>', self.scrolling)

def scrolling(self, event):
x = self.sc.canvasx(event.x)
y = self.sc.canvasy(event.y)
self.sc.resizescrollregion()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top