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.Parameters.Views/3.3/ScopeTreeLookupParameterView.cs

    r17180 r18166  
    106106    }
    107107    protected virtual void depthTextBox_KeyDown(object sender, KeyEventArgs e) {
    108       if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return))
     108      if ((e.KeyCode == Keys.Enter) || (e.KeyCode == Keys.Return)) {
    109109        depthLabel.Focus();  // set focus on label to validate data
    110       if (e.KeyCode == Keys.Escape) {
     110        e.SuppressKeyPress = true;
     111      } else if (e.KeyCode == Keys.Escape) {
    111112        depthTextBox.Text = Content.Depth.ToString();
    112113        depthLabel.Focus();  // set focus on label to validate data
     114        e.SuppressKeyPress = true;
    113115      }
    114116    }
Note: See TracChangeset for help on using the changeset viewer.