mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-30 19:22:42 +02:00
lcl: don't show Find/Replace dialog modal but instead show them on top of active form based on patch of Anton (the second part of issue #0018329)
git-svn-id: trunk@28945 -
This commit is contained in:
parent
ebffc65625
commit
9a7581569d
@ -166,27 +166,25 @@ end;
|
||||
|
||||
function TFindDialog.CreateForm: TForm;
|
||||
begin
|
||||
Result:=TFindDialogForm.Create(nil);// do not use Self as Owner, otherwise as desgntime this will not work
|
||||
//DebugLn(['TFindDialog.CreateForm ',DbgSName(Result),' ',Result.ControlCount]);
|
||||
with TFindDialogForm(Result) do begin
|
||||
FindButton.Caption:=rsFind;
|
||||
CancelButton.Caption:=rsMbCancel;
|
||||
HelpButton.Caption:=ifsVK_HELP;
|
||||
WholeWordsOnlyCheckBox.Caption:=rsWholeWordsOnly;
|
||||
CaseSensitiveCheckBox.Caption:=rsCaseSensitive;
|
||||
EntireScopeCheckBox.Caption:=rsEntireScope;
|
||||
FindLabel.Caption:=rsText;
|
||||
DirectionRadioGroup.Caption:=rsDirection;
|
||||
DirectionRadioGroup.Items[0]:=rsForward;
|
||||
DirectionRadioGroup.Items[1]:=rsBackward;
|
||||
// do not use Self as Owner, otherwise as desgntime this will not work
|
||||
Result := TFindDialogForm.Create(nil);
|
||||
with TFindDialogForm(Result) do
|
||||
begin
|
||||
FindButton.Caption := rsFind;
|
||||
CancelButton.Caption := rsMbCancel;
|
||||
HelpButton.Caption := ifsVK_HELP;
|
||||
WholeWordsOnlyCheckBox.Caption := rsWholeWordsOnly;
|
||||
CaseSensitiveCheckBox.Caption := rsCaseSensitive;
|
||||
EntireScopeCheckBox.Caption := rsEntireScope;
|
||||
FindLabel.Caption := rsText;
|
||||
DirectionRadioGroup.Caption := rsDirection;
|
||||
DirectionRadioGroup.Items[0] := rsForward;
|
||||
DirectionRadioGroup.Items[1] := rsBackward;
|
||||
//Setting up button eventhandlers
|
||||
FindButton.OnClick := @FindClick;
|
||||
HelpButton.OnClick := @HelpClick;
|
||||
CancelButton.OnClick := @CancelClick;
|
||||
//Once the issues concerning FormStyle = fsStayOnTop are resolved we can implement this
|
||||
//so that the form should stay on top of the application (not on top of everything)
|
||||
//See bug #8471 in Mantis
|
||||
//FormStyle := fsStayOnTop;
|
||||
PopupMode := pmAuto;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -268,9 +266,7 @@ begin
|
||||
FFindForm.OnShow := Self.OnShow;
|
||||
FFindForm.HelpContext:=HelpContext;
|
||||
FFindForm.Caption:=Title;
|
||||
//Once the issues concerning FormStyle = fsStayOnTop are resolved we can
|
||||
//make this a non-Modal window using FFindForm.Show;
|
||||
FFindForm.ShowModal;
|
||||
FFindForm.Show;
|
||||
Result := true;
|
||||
end;
|
||||
end;
|
||||
|
@ -64,21 +64,23 @@ end;
|
||||
|
||||
function TReplaceDialog.CreateForm: TForm;
|
||||
begin
|
||||
Result:=TReplaceDialogForm.Create(nil);
|
||||
with TReplaceDialogForm(Result) do begin
|
||||
FindMoreButton.Caption:=rsFindMore;
|
||||
ReplaceButton.Caption:=rsReplace;
|
||||
ReplaceAllButton.Caption:=rsReplaceAll;
|
||||
CancelButton.Caption:=rsMbCancel;
|
||||
HelpButton.Caption:=ifsVK_HELP;
|
||||
WholeWordsOnlyCheckBox.Caption:=rsWholeWordsOnly;
|
||||
CaseSensitiveCheckBox.Caption:=rsCaseSensitive;
|
||||
EntireScopeCheckBox.Caption:=rsEntireScope;
|
||||
TextLabel.Caption:=rsText;
|
||||
ReplaceLabel.Caption:=rsReplace;
|
||||
DirectionRadioGroup.Caption:=rsDirection;
|
||||
DirectionRadioGroup.Items[0]:=rsForward;
|
||||
DirectionRadioGroup.Items[1]:=rsBackward;
|
||||
// do not use Self as Owner, otherwise as desgntime this will not work
|
||||
Result := TReplaceDialogForm.Create(nil);
|
||||
with TReplaceDialogForm(Result) do
|
||||
begin
|
||||
FindMoreButton.Caption := rsFindMore;
|
||||
ReplaceButton.Caption := rsReplace;
|
||||
ReplaceAllButton.Caption := rsReplaceAll;
|
||||
CancelButton.Caption := rsMbCancel;
|
||||
HelpButton.Caption := ifsVK_HELP;
|
||||
WholeWordsOnlyCheckBox.Caption := rsWholeWordsOnly;
|
||||
CaseSensitiveCheckBox.Caption := rsCaseSensitive;
|
||||
EntireScopeCheckBox.Caption := rsEntireScope;
|
||||
TextLabel.Caption := rsText;
|
||||
ReplaceLabel.Caption := rsReplace;
|
||||
DirectionRadioGroup.Caption := rsDirection;
|
||||
DirectionRadioGroup.Items[0] := rsForward;
|
||||
DirectionRadioGroup.Items[1] := rsBackward;
|
||||
|
||||
//Setting up button eventhandlers
|
||||
FindMoreButton.OnClick := @FindClick;
|
||||
@ -86,10 +88,7 @@ begin
|
||||
ReplaceAllButton.OnClick := @ReplaceAllClick;
|
||||
CancelButton.OnClick := @CancelClick;
|
||||
HelpButton.OnClick := @HelpClick;
|
||||
//Once the issues concerning FormStyle = fsStayOnTop are resolved we can implement this
|
||||
//so that the form should stay on top of the application (not on top of everything)
|
||||
//See bug #8471 in Mantis
|
||||
//FormStyle := fsStayOnTop;
|
||||
PopupMode := pmAuto;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user