# Created by Leo from: C:\Development\Python22\Lib\site-packages\vb2py\vb2py.leo
"""The main form for the application"""
from PythonCardPrototype import model
class Background(model.Background):
def __getattr__(self, name):
"""If a name was not found then look for it in components"""
return getattr(self.components, name)
from vb2py.vbfunctions import *
class MAINFORM(Background):
""" A form to test the Like function"""
a = 10
b = 2
def on_btnCheckLike_mouseClick(self, event=None):
if Like(self.txtOne.text, self.txtTwo.text):
self.lblLike.text = 'Yes'
else:
self.lblLike.text = 'No'
# VB2PY (UntranslatedCode) Attribute VB_Name = "frmForm"
# VB2PY (UntranslatedCode) Attribute VB_GlobalNameSpace = False
# VB2PY (UntranslatedCode) Attribute VB_Creatable = False
# VB2PY (UntranslatedCode) Attribute VB_PredeclaredId = True
# VB2PY (UntranslatedCode) Attribute VB_Exposed = False
if __name__ == '__main__':
app = model.PythonCardApp(MAINFORM)
app.MainLoop()
|