所以,我刚刚开始使用 PythonCard,我无法让最基本的应用程序工作:S 我试图在单击按钮时将 TextFields 中的值分配给变量;请看看你是否能理解问题所在:D
我的python主文件:
from PythonCard import model
class register(model.Background):
def on_register_mouseClick(self, event):
title = self.components.title.text
artist = self.components.artist.text
if __name__ == '__main__':
app = model.Application(register)
app.MainLoop()
我的资源文件:
{'type':'CustomDialog',
'name':'Template',
'title':'Dialog Template',
'position':(125, 125),
'size':(300, 181),
'components': [
{'type':'TextField',
'name':'artist',
'position':(115, 48),
'text':'artist',
},
{'type':'TextField',
'name':'title',
'position':(116, 15),
'text':'title',
},
{'type':'Button',
'id':5100,
'name':'register',
'position':(10, 35),
'default':1,
'label':'OK',
},
] # end components
} # end CustomDialog
提前致谢!:D