Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/26/21 20:49:51 (2 years ago)
Author:
gkronber
Message:

#3047: set SuppressKeyPress=true in all controls that handle the Enter key explicitly (except for dialogs).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolView.cs

    r17180 r18166  
    7070    #region control event handlers
    7171    private void initialFrequencyTextBox_KeyDown(object sender, KeyEventArgs e) {
    72       if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return))
     72      if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return)) {
    7373        initialFrequencyLabel.Select();  // select label to validate data
    74 
    75       if (e.KeyCode == Keys.Escape) {
     74        e.SuppressKeyPress = true;
     75      } else  if (e.KeyCode == Keys.Escape) {
    7676        initialFrequencyTextBox.Text = Content.InitialFrequency.ToString();
    7777        initialFrequencyLabel.Select();  // select label to validate data
     78        e.SuppressKeyPress = true;
    7879      }
    7980    }
Note: See TracChangeset for help on using the changeset viewer.