CGrid:AttachHandle
The AttachHandle method attaches a window handle to this CGridView object. The handle may have been obtained from the System Registry using the CRegistry:GetWnd method.
bSuccess = CGridView:AttachHandle( handle ) where |
handle is the handle of a grid window displayed on the Mira desktop.
bSuccess is the returned success code. On success it is true, otherwise false.
The window handle applies only to a specific grid window displayed on the Mira desktop. If you close an grid window and create a new grid window, the new window will have a different handle value. Use this method to fetch the handle of an existing GUI grid window that was saved by a previous script.
The following script fetches the handle of an existing GUI grid window from the registry, attaches the handle to a CGridView object, and then displays a new CGrid in the window. It is assumed that the grid window's handle was saved to the Registry by a prior script.
|
-- create a link to the Registry |
-- |
-- get a CGrid, G, to display |
|
-- create a new CGridView object |
|
-- fetch the handle of the existing GUI grid window |
|
-- attach the handle to this CGridView object |
|
-- display the CGrid in the existing grid window |