WideStudio Logo
WideStudio
Programming Guide
WideStudio Index
Table of contents


How to get the parent instance

You can get the parent instance with the method: WSCbase::getParent().

In the following sample, it acquires the parent instance which places the instance "object", and set False to the visibility of the parent.

use mpfc;

sub event_procedure {
  my ($object) = @_;

  # get the parent instance.
  $parent = mpfc::WSCbase_getParent($object);
  # access the parent instance.
  mpfc::WSCbase_setVisible($parent,$mpfc::False);
  return;
}
1;



How to get the parent top level window

You can get the parent window instance with the method: WSCbase::getParentWindow().

In the following sample, it acquires the parent window instance, and pops down the window. Sometimes this scene is found when closing window by a button instance.

use mpfc;

sub event_procedure {
  my ($object) = @_;

  # get the parent window.
  $win = mpfc::WSCbase_getParentWindow($object);
  # pop-down the window.
  mpfc::WSCbase_setVisible($win,$mpfc::False);
  return;
}
1;


Document Release 3.70 for WideStudio ver 3.70, Feb 2004


WideStudio documents index | Table of contents

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