mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 14:20:41 +02:00
lcl: update cancel and default form controls on button handle creation (fixes bug #0013310)
git-svn-id: trunk@20254 -
This commit is contained in:
parent
fef147777a
commit
663367c26a
@ -50,7 +50,7 @@ begin
|
||||
inherited CreateWnd;
|
||||
//this is done in TWinControl
|
||||
//SetText(Caption);//To ensure shortcut is set
|
||||
WSSetDefault;
|
||||
UpdateDefaultCancel;
|
||||
end;
|
||||
|
||||
procedure TCustomButton.ControlKeyDown(var Key: Word; Shift: TShiftState);
|
||||
@ -290,11 +290,16 @@ begin
|
||||
end;
|
||||
|
||||
procedure TCustomButton.Loaded;
|
||||
var
|
||||
Form: TCustomForm;
|
||||
begin
|
||||
inherited Loaded;
|
||||
|
||||
UpdateDefaultCancel;
|
||||
end;
|
||||
|
||||
procedure TCustomButton.UpdateDefaultCancel;
|
||||
var
|
||||
Form: TCustomForm;
|
||||
begin
|
||||
Form := GetParentForm(Self);
|
||||
if Form <> nil then
|
||||
begin
|
||||
|
@ -1087,6 +1087,7 @@ type
|
||||
procedure WSSetText(const AText: String); override;
|
||||
procedure TextChanged; override;
|
||||
procedure Loaded; override;
|
||||
procedure UpdateDefaultCancel;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
procedure ExecuteDefaultAction; override;
|
||||
|
Loading…
Reference in New Issue
Block a user