CT Last event

4D - Documentation   Français   English   German   4D Chart, Command Theme List   4D Chart, Command Alphabetical List   Back   Previous   Next

version 1


CT Last event (area) Longint

ParameterTypeDescription
areaLongint4D Chart area
Function resultLongintCode of the code of the last event
that occurred in area

Description

CT Last event returns the code of the last event that occurred in area.

CT Last event can be used in the object method of a 4D Chart area or in an event method installed with CT ON EVENT. CT Last event identifies the event that caused the object or project method to execute. When used with the CT EVENT FILTER command, CT Last event allows you to take action based on a user's actions.

The following table lists the event codes:

ValueEvent
-1All events
0No events
1Area creation
2Area deletion
4Area activated (clicked or brought to the front)
8Area deactivated (area is no longer active)
16Object creation (create, paste, duplicate)
32Object deletion (delete, cut, clear)
64Command-click (not necessarily on object)
128Object was moved (nudge, alignment, move, etc.)
256Object was resized (arrow keys, drag, etc.)
1024Change in selected object(s)
2048Double-click
4096Object was reshaped

Example

In this example, CT Last event is used in a method installed by CT ON EVENT to identify double-clicks. When a user double-clicks a graph, a custom dialog box is displayed to allow the user to make changes to the graph.

   If (CT Last event (Area)=2048)        `If it is a double-click
      If (CT Get object type (Area;0)=5)    `If it is a graph
            `Open the custom Change Chart dialog box
         CHANGE CHART (Area;CT Get ID (Area;0;1))   
      End if 
   End if 

See Also

CT EVENT FILTER, CT ON EVENT.


4D - Documentation   Français   English   German   4D Chart, Command Theme List   4D Chart, Command Alphabetical List   Back   Previous   Next