WideStudio Logo
WideStudio
Programming Guide
WideStudio Index
Table of contents


移动对象

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


public class event_procedure {
  protected static void event_procedure(WSCbase object){
    // 清除
    object.clear();
    // 将对象设置为不可见
    object.setVisible((short)Mpfc.False);
    // 移动对象
    object.setProperty("x",100);
    object.setProperty("y",100);
    // 将对象设置为可见
    object.setVisible((short)Mpfc.True);
  }
}

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

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

Document Release 3.70 for WideStudio ver 3.70, May 2004


WideStudio documents index | Table of contents

Copyright(C) WideStudio Development Team, 1999-2004 Last modified: May 25, 2004