4D Chart v13

CT Last event

Home

 
4D Chart v13
CT Last event

CT Last event 


 

CT Last event ( area ) -> Function result 
Parameter Type   Description
area  Longint in 4D Chart area
Function result  Longint in Code of the code of the last event that occurred in area

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

 
PROPERTIES 

Product: 4D Chart
Theme: CT Area Control
Number: 14516

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D Chart 1

 
SEE ALSO 

CT EVENT FILTER
CT ON EVENT