CGridView:GetGridCtrl


The GetGridCtrl method returns the CGridCtrl object internal to the CGridView object. This method allows CGridCtrl methods to be used on the CGridView class.

Syntax

CGridCtrl_obj = CGridView:GetGridCtrl()

bullet.gif    On success, the internal CGridCtrl object is returned.

bullet.gif    On failure, nil is returned.

Example

Assume that the Mira desktop shows several grid view windows. The following script attaches one of the view windows and returns a CGridCtrl attached to the view window's grid control. It prints the name of the view window and the name of the grid control's parent window, which should be identical:

V = attachlist_gridview()

-- attach a grid window from the desktop

if V == nil then Exit("No Grid View") end

-- if not successful, exit the script

G = V:GetGridCtrl()

-- return the internal grid control

if G == nil then Exit("No Grid control") end

 

Printf("Grid view name: %s\n", V:GetTitle())

-- print the title of the attached window

Printf("Grid name: %s\n", G:GetWndTitle())

-- print the title of the attached window

Related Topics

CGridView class

CGridCtrl class

attachlist_gridview

new_gridctrl


Mira Pro x64 Script User's Guide, v.8.77 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.