Container: easy way to convert a simple BaseObject into a widget

# Jump directly to Examples

Container: easy way to convert a simple BaseObject into a widget

class pymt.ui.widgets.container.MTContainer(baseobject, **kwargs)

Bases: pymt.ui.widgets.widget.MTWidget

Convert a BaseObject like into a MTWidget.

Parameters :
fit_to_parent : bool, default to True

set baseobject size to parent size

class pymt.ui.widgets.container.MTScatterContainer(baseobject, **kwargs)

Bases: pymt.ui.widgets.container.MTContainer, pymt.ui.widgets.scatter.MTScatterWidget

Convert a BaseObject like into a MTScatterWidget.

Examples

File ui_widgets_container.py

from pymt import *
import os

# load an image
current_dir = os.path.dirname(__file__)
image = Image(os.path.join(current_dir, 'image.jpg'))

# create a scatter container, and put the image in
scatter = MTScatterContainer(image)

runTouchApp(scatter)

Table Of Contents

Previous topic

Circular Slider: Using this you can make circularly shaped sliders

Next topic

Coverflow: a coverflow widget

This Page