Skip to content

Commit

Permalink
Spacebar or Tab will auto select both exchange fields. (#228)
Browse files Browse the repository at this point in the history
Spacebar or Tab will auto select both exchange fields.
  • Loading branch information
w7sst committed Jan 25, 2024
2 parents a0dfaba + ac32627 commit bf93819
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Main.dfm
Expand Up @@ -228,6 +228,7 @@ object MainForm: TMainForm
MaxLength = 4
ParentFont = False
TabOrder = 2
OnEnter = Edit3Enter
OnKeyPress = Edit3KeyPress
end
object Panel2: TPanel
Expand Down
7 changes: 7 additions & 0 deletions Main.pas
Expand Up @@ -350,6 +350,7 @@ TMainForm = class(TForm)
procedure SimContestComboPopulate;
procedure ExchangeEditExit(Sender: TObject);
procedure Edit4Exit(Sender: TObject);
procedure Edit3Enter(Sender: TObject);

private
MustAdvance: boolean;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit bf93819

Please sign in to comment.