Stencil container: clip drawing of children to his container

Stencil container: clip drawing of children to his container

class pymt.ui.widgets.stencilcontainer.MTStencilContainer(**kwargs)

Bases: pymt.ui.widgets.widget.MTWidget

This container clip the children drawing to his container

from pymt import *
s = MTStencilContainer(size=(200, 200))
s.add_widget(MTLabel(label="plop", pos=(100, 100), font_size=16))
s.add_widget(MTLabel(label="a very very long sentence !", pos=(100, 150), font_size=16))
w = MTWindow()
w.add_widget(s)
runTouchApp()

Previous topic

Speech Bubble: a little speech bubble !

Next topic

SVG widget: widget that display an svg image

This Page