UPD: Show "Options" dialog as non-modal

This commit is contained in:
Alexander Koblov 2011-11-26 11:04:55 +00:00
commit 8faf3e47fa
4 changed files with 10 additions and 7 deletions

View file

@ -7,11 +7,12 @@ object frmOptions: TfrmOptions
Caption = 'Options'
ClientHeight = 203
ClientWidth = 517
OnClose = FormClose
OnCreate = FormCreate
OnDestroy = FormDestroy
Position = poScreenCenter
SessionProperties = 'Height;Width;WindowState;Left;Top'
ShowInTaskBar = stNever
ShowInTaskBar = stAlways
LCLVersion = '0.9.30'
object Panel1: TPanel
Left = 0

View file

@ -1,4 +1,4 @@
TFRMOPTIONS.CAPTION=Options
TFRMOPTIONS.FRMOPTIONS.CAPTION=Options
TFRMOPTIONS.BTNOK.CAPTION=&OK
TFRMOPTIONS.BTNCANCEL.CAPTION=Cancel
TFRMOPTIONS.BTNAPPLY.CAPTION=Apply

View file

@ -59,6 +59,7 @@ type
sboxOptionsEditor: TScrollBox;
tvTreeView: TTreeView;
splOptionsSplitter: TSplitter;
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure btnOKClick(Sender: TObject);
procedure btnApplyClick(Sender: TObject);
@ -94,6 +95,11 @@ begin
InitPropStorage(Self);
end;
procedure TfrmOptions.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
CloseAction:= caFree;
end;
procedure TfrmOptions.btnOKClick(Sender: TObject);
begin
// save all configuration

View file

@ -1593,11 +1593,7 @@ begin
else
frmOptions := TfrmOptions.Create(Application, param);
try
frmOptions.ShowModal;
finally
frmOptions.Free;
end;
frmOptions.Show;
end;
procedure TMainCommands.cm_CompareContents(Param: String='');