Sign in Join
FPDoc Onlineexperiment

TUpDown.Associate property

Member of TUpDownpublishedIn unit ComCtrls

Control used to display and edit the Position for the control.

Declaration

pascal
property Associate:;

Description

Associate is a TWinControl property with the control used to display and edit the value for the Position property in the control.

Changing the value for the property causes a previously assigned control to be disconnected; its event handlers are unassigned and the Associate property is Nil'd prior to setting the new value for the property.

The new control in the property value is connected to the class instance. This is done by setting its text to the value in Position, and by assigning event handler routines for the control. These include the AssociateKeyDown, OnAssociateChangeBounds, OnAssociateChangeEnabled, OnAssociateChangeVisible, and AssociateMouseWheel methods in the class.

Please note that the Associate control must have the same Parent as the class instance. An Exception is raised with the message in rsIsAlreadyAssociatedWith if another control on the Parent is already associated with the TUpDown class instance.

In addition, the value assigned to Associate cannot be derived from TCustomUpDown, TCustomTreeView or TCustomListView. The new property value is ignored if these controls are assigned to Associate.

Since Associate is declared as TWinControl, event handlers may need to cast the value to a derived type to access properties or methods specific to the descendant.

Errors

Raises an Exception with the message in rsIsAlreadyAssociatedWith if another control on the Parent is already associated with the class instance.

This description is the one of ComCtrls.TCustomUpDown.Associate.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.