AllowedEvents

concerns

 

Type

Read/Write

String

Yes/Yes

If a control is added to a form at run time by the Add method available in then Controls collection of a form or another control container, the names of the event methods can be specified with the function AllowedEvents. The event names will be concatenated divided by a semicolon (;).

Example:

 

Dim c As Control

 

c := F1.Controls.Add("TCEEdit.Edit", "MyEdit", 1000, 1000, 2000, 200, True, "GenericEvent", "KeyDown;KeyUp", "EDIT")

 

c.AlignRight := TCEServer.AlignHorizontal.AlignHorRight

c.Expression("Value", TCEServer.ControlPropertyTypes.ObjectProperty) := "Country"

The program code above is adding a new control of type TCEEdit.Edit in a form. The method, which is receiving the events of the control is named GenericEvent. This function is called for the events KeyDown and KeyUp. A style template EDIT of the properties of the knowledge base is used.

 

The structure of the function receiving the events of a control must be defined like:

 

Function GenericEvent(ByVal EI As TCEServer.ControlEventInfo) As Void

  

End Function