attachlist_panegridctrl
The attachlist_panegridctrl function attaches a CGridCtrl object to the grid control in a docking pane owned by a view window. Grid Controls are supported by top-level Grid View windows and Grid dialogs, and by docking panes owned by some top-level windows. To attach to the grid control of a top-level window, use the attachlist_gridview function. To attach the grid in a docking pane, use this method. For example, the Image Window attached to a CImageView object offers several dockibg panes for measurements such as Centroids, Statistics, Points, etc. The current function connects a CGridCtrl object to one of the Image Window grid panes. If one grid pane is open more than one grid pane is open by the target view window, a selector window opens for selecting the grid pane.
CGridCtrl_obj = attachlist_panegridctrl( View_Object ) |
View_Object
is an object of a view class, like CImageView or CPlotView.
On
success, CGridCtrl_Obj is a new
CGridCtrl class object.
On
failure, nil is
returned. This means no grid pane exists or was selected.
This function returns a selected grid docking panee owned by the view window attached to View_object. If the target image window has more than one open grid pane, a selector dialog opens for choosing the target docking pane. The selector dialog shown below indicates that the target image window has 3 open grid docking panes. The "FWHM" docking pane is being selected for return to the script:
Assume that at least one image window is displayed on the Mira desktop and one or more of them has an open docking pane containing a grid control. The following script selects an image window and then selects a docking pane containing a grid control. :
|
-- attach an image window from the desktop |
|
-- exit if no image window is attached |
|
|
|
|
|
-- select the pane and attach the grid control |
|
-- exit if no grid control was attached |
|
-- list properties of the attached CGridCtrl |
|
--result: Pane='FWHM', cols=10, rows used=1 |
Mira Pro x64 Script User's Guide, v.8.77 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.