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

# TCustomRadioGroup.OnClick

Event called when the selected item is changed.

## Declaration

Source position: extctrls.pp line 778

`public property TCustomRadioGroup.OnClick : TNotifyEvent read FOnClick write FOnClick;`

## Description

OnClick is different from the usual event TControl.OnClick. Instead of occurring on a mouse click on the control, this event is occurs when the currently selected item changes. It will not occur if a click does not make the selection change, will not occur upon clicking a already selected item and will occur if one changes the selection via the keyboard. It also occurs when the item is changed programmatically. This is done for Delphi compatibility.

Note that Lazarus also offers another event for the same task with a better name: see OnSelectionChanged for more details.

## See also

TControl.OnClick |  | Notification handler for mouse clicks.
TCustomRadioGroup.OnSelectionChanged |  | Event called when the selected item changes.