def __init__(self, *args, **kwds): """ Common widget wrapper initialization code. The main thing that we would normally do here is set any backend-specific attribute constraints. Whenever the application code alters a widget proxy, the front end will "push" any changed widget attributes into the backend by calling the wrapper.set<Attribute>(self,new_value) method for any attribute that changes. The setContraints() method allows the backend to specify the order in which the set<Attribute>() method calls are made, by specifying the order in which attribute names are set. The constraints set here are just examples. However, it is almost certainly a good idea to ensure that 'container' is set before any other attribute, so at minimum you should call "self.setConstraints('container')" here. """ AbstractWrapper.__init__(self, *args, **kwds) # 'container' before everything, then geometry. self.setConstraints('container', 'x', 'y', 'width', 'height') # addConstraint(self,before,after) adds a constraint that attribute # 'before' must be set before 'after', when both appear in the # same push operation. An attempt to set mutually contradictory # constraints will result in an exception. self.addConstraint('geometry', 'visible')
def __init__(self, *args, **kwds): AbstractWrapper.__init__(self, *args, **kwds) # 'container' before everything... self.setConstraints('container', 'x', 'y', 'width', 'height', 'text', 'selection') # Note: x,y,width, and height probably have no effect here, due to # the way getSetters() works. I'm not sure if that's something # that needs fixing or not... - jak self.addConstraint('geometry', 'visible')
def __init__(self, *args, **kwds): AbstractWrapper.__init__(self, *args, **kwds) # 'container' before everything, then geometry. self.setConstraints('container','x','y','width','height') # addConstraint(self,before,after) adds a constraint that attribute # 'before' must be set before 'after', when both appear in the # same push operation. An attempt to set mutually contradictory # constraints will result in an exception. self.addConstraint('geometry', 'visible')
def __init__(self,*args,**kws): self._width = 0 self._height = 0 AbstractWrapper.__init__(self,*args,**kws) self.setConstraints('container','x','y','width','height', 'text','selection','geometry','visible')
def __init__(self, *args, **kwds): AbstractWrapper.__init__(self, *args, **kwds) # @@@ Cookie-cutter from tkgui self.setConstraints('container','x','y','width','height','text','selection') self._container = None
def __init__(self, *args, **kws): AbstractWrapper.__init__(self, *args, **kws)