[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'ComCtrls' (#lcl)

TCustomUpDown.Associate

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

Declaration

Source position: comctrls.pp line 1991

protected property TCustomUpDown.Associate : TWinControl
  read FAssociate
  write SetAssociate;

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.

See also

TCustomUpDown.Position

  

The current position (or value) for the control as a SmallInt type.

TCustomUpDown.AssociateKeyDown

  

Implements the OnKeyDown event handler assigned to the Associate control in the class instance.

TCustomUpDown.OnAssociateChangeBounds

  

Implements an OnChangeBounds event handler assigned to the Associate control in the class instance.

TCustomUpDown.OnAssociateChangeEnabled

  

Implements an OnEnabledChanged event handler assigned to the Associate control in the class instance.

TCustomUpDown.OnAssociateChangeVisible

  

Implements an OnVisibleChanged event handler assigned to the Associate control in the class instance.

TCustomUpDown.AssociateMouseWheel

  

Implements an OnMouseWheel event handler assigned to the Associate control in the class instance.

TWinControl

  

Implements a windowed control which can contain other child controls.

TControl.Parent

  

The control within which the control is shown.


Version 4.0 Generated 2025-05-03 Home