mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 15:00:26 +02:00
LCL: Fix TRadiogroup firing OnEnter/OnExit events when its ItemIndex changes. New events OnItemEnter/OnItemExit. Issue #37768.
git-svn-id: trunk@63898 -
This commit is contained in:
parent
a3272084cf
commit
90afc72ac7
@ -683,6 +683,8 @@ type
|
||||
FItems: TStrings;
|
||||
FLastClickedItemIndex: integer;
|
||||
FOnClick: TNotifyEvent;
|
||||
FOnItemEnter: TNotifyEvent;
|
||||
FOnItemExit: TNotifyEvent;
|
||||
FOnSelectionChanged: TNotifyEvent;
|
||||
FReading: boolean;
|
||||
FUpdatingItems: Boolean;
|
||||
@ -725,6 +727,8 @@ type
|
||||
property Columns: integer read FColumns write SetColumns default 1;
|
||||
property ColumnLayout: TColumnLayout read FColumnLayout write SetColumnLayout default clHorizontalThenVertical;
|
||||
property OnClick: TNotifyEvent read FOnClick write FOnClick;
|
||||
property OnItemEnter: TNotifyEvent read FOnItemEnter write FOnItemEnter;
|
||||
property OnItemExit: TNotifyEvent read FOnItemExit write FOnItemExit;
|
||||
property OnSelectionChanged: TNotifyEvent read FOnSelectionChanged write FOnSelectionChanged;
|
||||
end;
|
||||
|
||||
@ -762,6 +766,8 @@ type
|
||||
property OnEndDrag;
|
||||
property OnEnter;
|
||||
property OnExit;
|
||||
property OnItemEnter;
|
||||
property OnItemExit;
|
||||
property OnKeyDown;
|
||||
property OnKeyPress;
|
||||
property OnKeyUp;
|
||||
|
@ -146,12 +146,12 @@ end;
|
||||
|
||||
procedure TCustomRadioGroup.ItemEnter(Sender: TObject);
|
||||
begin
|
||||
DoEnter;
|
||||
if Assigned(FOnItemEnter) then FOnItemEnter(Sender);
|
||||
end;
|
||||
|
||||
procedure TCustomRadioGroup.ItemExit(Sender: TObject);
|
||||
begin
|
||||
DoExit;
|
||||
if Assigned(FOnItemExit) then FOnItemExit(Sender);
|
||||
end;
|
||||
|
||||
procedure TCustomRadioGroup.ItemResize(Sender: TObject);
|
||||
|
Loading…
Reference in New Issue
Block a user