Skip to main content

TcxFormatController.AddListener(IcxFormatControllerListener) Method

Adds a new listener to a TcxFormatController instance.

Declaration

procedure AddListener(AListener: IcxFormatControllerListener); virtual;

Parameters

Name Type
AListener IcxFormatControllerListener

Remarks

Call this method to add a TcxFormatController listener (an object to receive controller notifications on date and currency format changes) to the notification list. Editors, which require “format changed” notifications (TcxCustomDateEdit and TcxCustomCurrencyEdit, for instance) add themselves as listeners to TcxFormatController. Thus, all editors subscribed to one format controller employ the same date and currency formats. The date and currency formats can be changed either by the TcxFormatController class due to an update in the system locale or by setting the format properties directly. To prevent a format controller from updating format properties because of changes to the system locale, set an application’s UpdateFormatSettings property to False.

Use the RemoveListener method to remove a specific listener from the notification list.

See Also