The IDLgrWindow::Init function method initializes the window object.

Note: Init methods are special lifecycle methods, and as such cannot be called outside the context of object creation. This means that in most cases, you cannot call the Init method directly. There is one exception to this rule: if you write your own subclass of this class, you can call the Init method from within the Init method of the subclass.

Note: When an IDLgrWindow object is created, its pixel values and depth buffer values are in an indeterminate state. This normally does not create a problem because most windows are completely covered by a non-transparent IDLgrView object, which causes the entire window to be painted with the view’s background color and causes the depth buffer to be cleared before drawing the graphics.

However, if any area of the window is left uncovered by an IDLgrView, that area may contain random pixels after the window is drawn. In addition, if a transparent view covers an area of the window not also covered by a non-transparent view, there may be unwanted random pixels in the transparent view as well as random depth buffer values, which may cause some graphic primitives to not appear in the view at all.

Calling the IDLgrWindow::Erase method is useful for initializing the areas of a window not covered by a view (or which are “under” transparent views) to the desired color and for initializing the depth buffer for subsequent drawing in transparent views.


Obj = OBJ_NEW('IDLgrWindow' [, PROPERTY=value])


Result = Obj->[IDLgrWindow::]Init([, PROPERTY=value])     (In a lifecycle method only.)

Return Value

When this method is called indirectly, as part of the call to the OBJ_NEW function, the return value is an object reference to the newly-created object.

When called directly within a subclass Init method, the return value is 1 if initialization was successful, or zero otherwise.




Any property listed under IDLgrWindow Properties that contains the word “Yes” in the “Init” column of the properties table can be initialized during object creation using this method. To initialize the value of a property, specify the property name as a keyword set equal to the appropriate property value.

All other keywords are passed to the superclass of this object.

Version History