ScrolledCanvas/ScrolledText

lekin2 at llnl.gov lekin2 at llnl.gov
Fri Sep 19 17:10:37 EDT 2008


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()




More information about the Python-list mailing list