Пример #1
0
 def __init__(self,
              possize,
              pattern=Qd.GetQDGlobalsBlack(),
              color=(0, 0, 0)):
     Widget.__init__(self, possize)
     self._framepattern = pattern
     self._framecolor = color
Пример #2
0
        lastpoint = (x, y)
        newcol = -1
        #W.SetCursor('fist')
        while Evt.Button():
            Evt.WaitNextEvent(0, 1, None)  # needed for OSX
            (x, y) = Evt.GetMouse()
            if (x, y) <> lastpoint:
                newcol = x + diff
                newcol = max(newcol, mincol)
                newcol = min(newcol, maxcol)
                Qd.PaintRect(rect)
                rect = newcol - 1, t, newcol, b
                Qd.PaintRect(rect)
                lastpoint = (x, y)
        Qd.PaintRect(rect)
        Qd.PenPat(Qd.GetQDGlobalsBlack())
        Qd.PenNormal()
        if newcol > 0 and newcol <> abscol:
            self.setcolumn(newcol - l)

    def click(self, point, modifiers):
        if point == (-1, -1):   # gross.
            W.List.click(self, point ,modifiers)
            return
        hit, index = self.inarrow(point)
        if hit:
            (key, value, arrow, indent) = self.items[index]
            self.fold(index, arrow == 1)
        elif self.incolumn(point):
            self.trackcolumn(point)
        else: