Procedure

TfrmSurgery.memNewNoteKeyDown

Module

fSurgery

Last Modified

7/15/2014 3:26:38 PM

Visibility

Public/Published

Owner

TfrmSurgery

Declaration

procedure memNewNoteKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);


Source

2634  procedure TfrmSurgery.memNewNoteKeyDown(Sender: TObject; var Key: Word;
2635    Shift: TShiftState);
2636  begin
2637    inherited;
2638    if (Key = VK_TAB) then
2639    begin
2640      if ssShift in Shift then
2641      begin
2642        FindNextControl(Sender as TWinControl, False, True, False).SetFocus; //previous control
2643        Key := 0;
2644      end
2645      else if ssCtrl	in Shift then
2646      begin
2647        FindNextControl(Sender as TWinControl, True, True, False).SetFocus; //next control
2648        Key := 0;
2649      end;
2650    end;
2651    if (key = VK_ESCAPE) then begin
2652      FindNextControl(Sender as TWinControl, False, True, False).SetFocus; //previous control
2653      key := 0;
2654    end;
2655  end;