MCPcopy Create free account
hub / github.com/PageBot/PageBot / build

Method build

Lib/pagebot/elements/ui/_future/uibutton.py:33–40  ·  view source on GitHub ↗

Draw a button and connect it to a callback function.

(self, view, nsParent=None, **kwargs)

Source from the content-addressed store, hash-verified

31 self.callback = callback
32
33 def build(self, view, nsParent=None, **kwargs):
34 """Draw a button and connect it to a callback function.
35 """
36 assert nsParent is not None
37 button = self.context.button(title=self.title, x=self.x, y=self.y,
38 w=self.w, h=self.h, style=self.style, callback=self.callback)
39 print('dsdadas', button, self.callback)
40 setattr(nsParent, self.name or 'untitledButton', button)
41
42if __name__ == '__main__':
43 import doctest

Callers

nothing calls this directly

Calls 1

buttonMethod · 0.80

Tested by

no test coverage detected