Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spacebar or Tab will auto select both exchange fields. #228

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Main.dfm
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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