Navigation: ABC Library Reference > WindowManager > WindowManager Methods >====== Reset (reset the window for display) ====== | |
Reset( [force reset] ), VIRTUAL
Reset | Resets the WindowManager object. |
force reset | A numeric constant, variable, EQUATE, or expression that indicates whether to conditionally or unconditionally reset the window. A value of one (1 or True) unconditionally resets the window; a value of zero (0 or False) only resets the window if circumstances require, such as a new sort on browse object or a changed reset field on a browse object. If omitted, force reset defaults to zero (0). |
The Reset method resets the WindowManager object and any registered (AddItem) objects. A force reset value of one (1 or True) unconditionally resets all the objects and should therefore be used sparingly to enhance performance.
Implementation:
The Reset method calls the ResetSort and UpdateWindow methods for each BrowseClass object registered by the AddItem method. It calls the ResetQueue method for each FileDropClass object registered by the AddItem method.
The Open, TakeWindowEvent, and TakeNewSelection methods all call the Reset method.
Example:
ThisWindow.TakeWindowEvent PROCEDURE
CODE
CASE EVENT()
OF EVENT:GainFocus
IF BAND(SELF.Inited,1)
SELF.Reset
ELSE
SELF.Open
END
OF EVENT:Sized
IF BAND(SELF.Inited,2)
SELF.Reset
ELSE
SELF.Inited = BOR(SELF.Inited,2)
END
END
RETURN Level:Benign
See Also: AutoRefresh, Open, ResetOnGainFocus, TakeNewSelection, TakeWindowEvent, BrowseClass.AddResetField, BrowseClass.ResetSort, BrowseClass.UpdateWindow