ScrolledCanvas/ScrolledText

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lekin2@llnl.gov

    ScrolledCanvas/ScrolledText

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

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

    self._title = Pmw.ScrolledTex t(self.sc.inter ior(),
    labelpos = 'w',
    text_wrap='word ',
    usehullsize=1,
    hull_height= 50,
    hull_width=500)
    titleVal = "Equation of state for %s" % (materialName)
    self._title.ins ert(1.0, titleVal)
    self._title.com ponent("label") .config(text="T itle:")

    self.sc.compone nt('canvas').bi nd('<Button-1>', self.scrolling)

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

Working...