From ac326271720a41d7996fa623da7bafa85ff1ecf2 Mon Sep 17 00:00:00 2001 From: Mike Brashler Date: Wed, 24 Jan 2024 17:12:36 -0800 Subject: [PATCH] Spacebar or Tab will auto select both exchange fields. --- Main.dfm | 1 + Main.pas | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/Main.dfm b/Main.dfm index 02cb8d4..6e26cdc 100644 --- a/Main.dfm +++ b/Main.dfm @@ -228,6 +228,7 @@ object MainForm: TMainForm MaxLength = 4 ParentFont = False TabOrder = 2 + OnEnter = Edit3Enter OnKeyPress = Edit3KeyPress end object Panel2: TPanel diff --git a/Main.pas b/Main.pas index 56d2393..671aede 100644 --- a/Main.pas +++ b/Main.pas @@ -350,6 +350,7 @@ TMainForm = class(TForm) procedure SimContestComboPopulate; procedure ExchangeEditExit(Sender: TObject); procedure Edit4Exit(Sender: TObject); + procedure Edit3Enter(Sender: TObject); private MustAdvance: boolean; @@ -589,6 +590,12 @@ procedure TMainForm.Edit2KeyPress(Sender: TObject; var Key: Char); end; end; +procedure TMainForm.Edit3Enter(Sender: TObject); +begin + Edit3.SelStart := 0; + Edit3.SelLength := Edit3.GetTextLen; +end; + { Exchange field 2 key press. This procedure is called upon any keystroke in the Exchange 2 field. Depending on the exchange field type, it will