Try OpenEdge Now
skip to main content
GUI for .NET Programming
Creating and Using Forms and Controls : OpenEdge .NET form and control objects : Commonly-used .NET public control methods, properties, and events : Common .NET public control methods
 
Common .NET public control methods
The following table shows some of the more common .NET public control methods.
Table 6. Common .NET public control methods
Method
Description
Dispose( )
Releases all resources held by the control or control container in preparation for garbage collection. You cannot override this method, as it is defined as FINAL in ABL. Note that the object on which you call this method is not garbage collected immediately and the object reference continues to work until .NET garbage collects the object.
Note: Typically, you never have to call this method directly in ABL. If you execute the ABL DELETE OBJECT statement on the form or control object reference, this sufficiently prepares the .NET object for garbage collection wherever you might otherwise call the Dispose( ) method in .NET. However, for .NET modal forms (dialog boxes, including ABL-derived forms), you must call this method to ensure that the form object is garbage collected. For more information, see Blockingon modal dialog boxes. Before executing DELETE OBJECT, you should also call this method on any instances of Progress.Data.BindingSource that you use to bind a ProDataSet to a .NET control. For more information, see Usingthe Dispose( ) method.
Focus( )
Sets input focus on the control.
Hide( )
Conceals the control or control container from the user by setting its Visible property to FALSE.
ResumeLayout( )
Resumes layout logic for the control or control container after it was suspended using the SuspendLayout( ) method. Typically invoked on a form or other control container with a single LOGICAL argument set to FALSE in order to suppress the immediate resumption of pending layout logic until after all initialization of the control container is complete. This represents a performance improvement, especially for initializing control containers that have large numbers of child controls added.
Show( )
Displays the control or control container to the user by setting its Visible property to TRUE.
SuspendLayout( )
Temporarily suspends layout of the control, form, or other control container in order to prevent Control.Layout events from firing unnecessarily while completing control initialization. After control container initialization completes, you invoke the ResumeLayout( ) method in order to allow the control initialization settings to take effect.