Jump to content

wpAddFirstChild

From EDM2
Revision as of 17:47, 1 September 2025 by Martini (talk | contribs) (Created page with "{{DISPLAYTITLE:wpAddFirstChild}} This method is specific to version 3, or higher, of the OS/2 operating system. This instance method is called to add one child to a folder. ==Syntax== _wpAddFirstChild(somSelf); ==Parameters== ;''somSelf'' (WPFolder *) - input :Pointer to the object on which the method is being invoked. :Points to an object of class WPFolder. ;''Object'' (WPObject *) - returns :Pointer to the instantiated child object. ==Returns== ;''Object'' (WPO...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This method is specific to version 3, or higher, of the OS/2 operating system. This instance method is called to add one child to a folder.

Syntax

_wpAddFirstChild(somSelf);

Parameters

somSelf (WPFolder *) - input
Pointer to the object on which the method is being invoked.
Points to an object of class WPFolder.
Object (WPObject *) - returns
Pointer to the instantiated child object.

Returns

Object (WPObject *) - returns
Pointer to the instantiated child object.

Remarks

This method is called when a folder appears in a tree view. As opposed to wpPopulate, wpAddFirstChild adds only one child to the folder; therefore, when the folder appears in the tree view, it has the correct expansion emphasis. When the folder is expanded, it will be fully populated.

How to Override

This method should be overridden only if there is another way of adding the first child of a folder.

Example Code

Definition:

#define INCL_WINWORKPLACE
#include <os2.h>
WPFolder *somSelf; /* Pointer to the object on which the method is being invoked. */
WPObject *Object; /* Pointer to the instantiated child object. */
Object = _wpAddFirstChild(somSelf);

Related Methods