WideStudio/MWT Logo
WideStudio/MWT
Programming Guide
WideStudio/MWT Index
Table of contents


例1 (Hello World)

首先,创建项目,接着创建应用程序窗口和事件过程。 在如下所示的基本例子中,窗口中的按钮被按下后, 会显示“hello”字符串。

源代码如下所示: ws/samples/Python/hello/newproject.prj 使用应用程序生成器打开文件,并进行编译。



[应用程序窗口示例]

#----------------------------------------------------------
#Function for the event procedure
#----------------------------------------------------------
import mwt

def btn(object):
  object.setProperty("labelString","hello");
  return
mwt.WSGFfunctionRegister("btn",btn)



[应用程序运行示例]


Document Release 3.90 for WideStudio/MWT ver 3.90, Jul 2005


WideStudio/MWT documents index | Table of contents

Copyright(C) WideStudio/MWT Development Team, 1999-2005 Last modified: Jul 31, 2005