i m a beginner and don know anything about pymt , need help to do coding just like the picture below
when i push the button arts or maths it should open another .py file ...... pls some one help me........
What do you mean by ‘open another .py file’? What exactly is in that other file and what do you want to happen?
In general, you can connect callbacks to the Buttons’ on_release events:
def my_callback(*args): print 'Button has been pressed with', argsmy_button.connect('on_release', my_callback)
My Blog PyMT—Create Multitouch Software easily! Movid—New cross-platform tracker, work in progress!
from os.path import join, dirname, exists from pymt import *
urrent_dir = dirname(__file__)
layout = MTBoxLayout(orientation=’horizontal’, spacing=10, padding=10, pos=(350, 350))
button1 = MTButton(label=’BTN1’) button2 = MTButton(label=’BTN2’) layout.add_widget(button1) layout.add_widget(button2)
getWindow().add_widget(layout) runTouchApp()
this are the codes, i need help in inserting images to the button? to make button look like an image??