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


移动对象

按照如下步骤移动对象。移动对象前,需先执行清除操作。


def event_procedure(object)
  # 清除
  object.clear()
  # 将对象设置为不可见
  object.setVisible(Mwt::False)
  # 移动对象
  object.setProperty("x",100) 
  object.setProperty("y",100) 
  # 将对象设置为可见
  object.setVisible(Mwt::True) 
end

移动不具有窗口资源源的对象时,被移动的对象仍会在原来的位置上显示。 为了避免这种现象,首先调用clear()函数,再将对象的显示状态设置为不可见, 最后执行变更坐标的操作。

具有有窗口资源的对象能自动被清除。

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