CygNet Grid Events

Event icon The CygNet Grid supports the following scripting events. Click next to any event name in the Events pane to see a short description for the selected event.

See Accessing Screen Objects for more information about how to view control objects in script in the Canvas application.

When an event is enabled, the control will be automatically added to script and the Include in script property will be set to True.

Event Description Event Argument Type (more info)

Close

The Close event is called when the screen is closed.

 

Custom Context Menu Action

The Custom Context Menu Action event is called when the custom context menu item is clicked. A Script event ID (configured for each custom context menu item in the Context Menu Items property for the screen or control) is passed in along with other relevant information in the context of the click, for example, facility or point tag, as appropriate.

Canvas.Controls.Grid.CustomContextMenuActionEventArgs

When you click on a custom context menu item from a control, Canvas will execute the following function:

  • Grid1_CustomContextMenuAction(object sender, EventArgs args)

CustomContextMenuActionEventArgs.EventActionID indicates the Script event ID defined in the Custom Context Menu Configuration dialog box.

Example

private void Grid1_CustomContextMenuAction(object sender, EventArgs args)

{

CustomContextMenuActionEventArgs myargs = (CustomContextMenuActionEventArgs)args;

MessageBox.Show(myargs.MenuItemText + " " + myargs.EventActionID + " " + myargs.FacilityTag + " " + myargs.PointTag);

}

Double Click Cell

The Double Click Cell event is called when the user double-clicks on a grid cell.

Canvas.Controls.Grid.CygNetGridCellDoubleClickEventArgs

Example

var argument = args as Canvas.Controls.Grid.CygNetGridCellDoubleClickEventArgs;

Initialize

The Initialize event is called when the screen is created in preview or run mode to allow further initialization of the control.

 

Loaded

The Loaded event is called when the control is rendered and ready for interaction.

 

Mouse Enter

The Mouse Enter event is called when the mouse pointer enters (moves over) a control.

 

Mouse Leave

The Mouse Leave event is called when the mouse pointer leaves (moves out of) a control.

 

Selected Cells Changed

The Selected Cells Changed event is called when the grid cell selection changes.

Canvas.Controls.Grid.CygNetGridSelectionChangeEventArgs

Example

var argument = args as Canvas.Controls.Grid.CygNetGridSelectionChangeEventArgs;

See Order of Event Execution for information about the order in which events are executed on a screen.