WideStudio Logo
WideStudio
Programming Guide
WideStudio Index
目次


オブジェクトに配置されている子オブジェクトを取得するには

子オブジェクトを取得する関数には、次のようなメソッドを利用します。

子取得メンバ関数 機能
Mpfc::WSCbase getChildInstance(char*) オブジェクト名称指定による取得





特定の子オブジェクトを取得するには

特定の子オブジェクトを取得するには、メンバ関数 getChildInstance() を利用します。

def event_procedure(object)
  # 特定の子オブジェクトを名称を指定して取得
  child = object.getChildInstance("newpbtn001") 
  if child != nil
    # 特定の子オブジェクトにアクセス
    child.setVisible(Mpfc::True) 
  end
end

object が配置しているの子オブジェクトを名称指定で取得しているところです。 名称指定で子オブジェクトを取得する場合、再帰的(子オブジェクトに配置されている 子オブジェクトまで)に検索します。 もし指定した名称のオブジェクトが見つからなかった場合、nil が返されます。

Document Release 3.70 for WideStudio ver 3.70, Feb 2004


WideStudio documents index | 目次

Copyright(C) T. Hirabayashi, 2000-2004 Last modified: Feb 25, 2004