Ignore:
Timestamp:
Aug 5, 2016, 10:22:51 AM (8 years ago)
Author:
chronos
Message:
  • Modified: Set focus to filter control if main form is shown.
  • Fixed: Store main form position before form is hidden to be able to restore it on same position.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r79 r81  
    103103    procedure CoolTranslator1Translate(Sender: TObject);
    104104    procedure EditSearchChange(Sender: TObject);
     105    procedure FormHide(Sender: TObject);
    105106    procedure FormShow(Sender: TObject);
    106107    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
     
    188189end;
    189190
     191procedure TFormMain.FormHide(Sender: TObject);
     192begin
     193  PersistentForm1.Save(Self);
     194end;
     195
    190196procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    191197begin
     
    339345begin
    340346  Show;
     347  BringToFront;
    341348end;
    342349
     
    377384  PersistentForm1.Load(Self);
    378385  UpdateInterface;
     386  ListViewFilter1.StringGrid.SetFocus;
    379387end;
    380388
     
    439447procedure TFormMain.TrayIcon1Click(Sender: TObject);
    440448begin
    441   Visible := not Visible;
    442   if Visible then BringToFront;
     449  if not Visible then AShow.Execute
     450    else Hide;
    443451end;
    444452
Note: See TracChangeset for help on using the changeset viewer.