CT EVENT FILTER

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

version 1


CT EVENT FILTER (area; filter)

ParameterTypeDescription
areaLongint4D Chart area
filterLongintEvents to process

Description

The CT EVENT FILTER command specifies which events cause the object method of area or the event method to be executed.

By default, an object method attached to a 4D Chart area is executed when the user selects an object outside of the area. With CT EVENT FILTER you can specify other events that execute the method. In addition, a method installed with the CT ON EVENT command will also be executed.

filter specifies the events to use, expressed as the sum of event codes. The following are 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)
64Ctrl+Click (Windows) or Command-click (Macintosh),
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

If you specify -1 for area, the event filter becomes the default filter for all newly created 4D Chart areas on forms and in plug-in windows. This allows you to trap for areas created from the Plug-ins menu of the User environment. It also allows for consistent event handling in all areas.

Example

This example adds Ctrl+click and double-click to the list of default events trapped by the chart area's object method.

   CT EVENT FILTER (Area;64+2048)

See Also

CT Last event, CT ON EVENT.


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