mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-07 02:58:17 +02:00
replace ActiveControl := ... with ...SetFocus since ActiveControl raises exception when form is docked into another form. + misc formatting
git-svn-id: trunk@14526 -
This commit is contained in:
parent
095053bca9
commit
28012e8756
@ -5510,8 +5510,8 @@ begin
|
|||||||
UpdateStatusBar;
|
UpdateStatusBar;
|
||||||
// set focus to new editor
|
// set focus to new editor
|
||||||
TempEditor:=FindSourceEditorWithPageIndex(Notebook.PageIndex);
|
TempEditor:=FindSourceEditorWithPageIndex(Notebook.PageIndex);
|
||||||
if TempEditor<>nil then
|
if (TempEditor <> nil) then
|
||||||
ActiveControl:=TempEditor.EditorComponent;
|
TempEditor.EditorComponent.SetFocus;
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
//writeln('TSourceNotebook.CloseFile D PageIndex=',PageIndex);
|
//writeln('TSourceNotebook.CloseFile D PageIndex=',PageIndex);
|
||||||
@ -6318,7 +6318,7 @@ begin
|
|||||||
|
|
||||||
Label1 := TLabel.Create(Self);
|
Label1 := TLabel.Create(Self);
|
||||||
with Label1 do
|
with Label1 do
|
||||||
Begin
|
begin
|
||||||
Name:='Label1';
|
Name:='Label1';
|
||||||
Parent := Self;
|
Parent := Self;
|
||||||
Left := 6;
|
Left := 6;
|
||||||
@ -6329,7 +6329,7 @@ begin
|
|||||||
|
|
||||||
Edit1 := TEdit.Create(Self);
|
Edit1 := TEdit.Create(Self);
|
||||||
with Edit1 do
|
with Edit1 do
|
||||||
Begin
|
begin
|
||||||
Name:='Edit1';
|
Name:='Edit1';
|
||||||
Parent := self;
|
Parent := self;
|
||||||
Left := 6;
|
Left := 6;
|
||||||
@ -6341,7 +6341,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
ButtonPanel := TPanel.Create(Self);
|
ButtonPanel := TPanel.Create(Self);
|
||||||
with ButtonPanel do begin
|
with ButtonPanel do
|
||||||
|
begin
|
||||||
Name:='ButtonPanel';
|
Name:='ButtonPanel';
|
||||||
Align:=alBottom;
|
Align:=alBottom;
|
||||||
AnchorToNeighbour(akTop,0,Edit1);
|
AnchorToNeighbour(akTop,0,Edit1);
|
||||||
@ -6353,7 +6354,7 @@ begin
|
|||||||
|
|
||||||
btnCancel := TBitbtn.Create(Self);
|
btnCancel := TBitbtn.Create(Self);
|
||||||
with btnCancel do
|
with btnCancel do
|
||||||
Begin
|
begin
|
||||||
Name:='btnCancel';
|
Name:='btnCancel';
|
||||||
AnchorParallel(akTop,0,ButtonPanel);
|
AnchorParallel(akTop,0,ButtonPanel);
|
||||||
AnchorParallel(akBottom,0,ButtonPanel);
|
AnchorParallel(akBottom,0,ButtonPanel);
|
||||||
@ -6367,7 +6368,7 @@ begin
|
|||||||
|
|
||||||
btnOK := TBitbtn.Create(Self);
|
btnOK := TBitbtn.Create(Self);
|
||||||
with btnOK do
|
with btnOK do
|
||||||
Begin
|
begin
|
||||||
Name:='btnOK';
|
Name:='btnOK';
|
||||||
AnchorParallel(akTop,0,ButtonPanel);
|
AnchorParallel(akTop,0,ButtonPanel);
|
||||||
AnchorParallel(akBottom,0,ButtonPanel);
|
AnchorParallel(akBottom,0,ButtonPanel);
|
||||||
@ -6379,9 +6380,8 @@ begin
|
|||||||
Parent := ButtonPanel;
|
Parent := ButtonPanel;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
AutoSize:=true;
|
AutoSize := True;
|
||||||
|
ActiveControl := Edit1;
|
||||||
ActiveControl:=Edit1;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmGoto.DoShow;
|
procedure TfrmGoto.DoShow;
|
||||||
|
Loading…
Reference in New Issue
Block a user