Changeset 81 for trunk/Forms


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.
Location:
trunk/Forms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r74 r81  
    1212  OnCreate = FormCreate
    1313  OnDestroy = FormDestroy
     14  OnHide = FormHide
    1415  OnShow = FormShow
    1516  LCLVersion = '1.6.0.4'
     
    2324    ClientHeight = 395
    2425    ClientWidth = 631
    25     TabOrder = 0
     26    TabOrder = 1
    2627    object CheckBoxExactMath: TCheckBox
    2728      Left = 8
     
    7980    ParentShowHint = False
    8081    ShowHint = True
    81     TabOrder = 1
     82    TabOrder = 0
    8283    object ToolButton1: TToolButton
    8384      Left = 1
  • 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.