Enter Key on DoubleEditBox

Editors for WPF Forum

Posted 9 years ago by Cheetah
Version: 9.2.0515
Avatar
I've noticed a (minor) problem with DoubleEditBox and Int32EditBox. I have some of these in several dialog boxes with the usual OK and Cancel buttons, with IsDefault and IsCancel respectively set true. The problem is that the edit boxes are eating the enter key when they have focus (though not the escape key), which is rather harmful to the usability of the dialog boxes.

Is there a way to disable whatever behavior the enter key is being used for so that it can be used for the normal function of the OK button press in these dialogs?

Comments (4)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

The DoubleEditBox/Int32EditBox.PartValueCommitTriggers can be used to customize that behavior. By default, this is set to SpinnerChangeOrEnterKeyDown. You can change this to just SpinnerChange, and the Enter key will not be handled.

The Escape key should be handled if the value is "reverted", but there isn't a way to disable this behavior right now. Are you seeing an issue with the Escape key also?


Actipro Software Support

Posted 9 years ago by Cheetah
Avatar
Thanks, that solved the problem :)

As far as the Escape key, the default behavior for it is good: If a text edit is in progress, the escape key cancels the text edit, otherwise it performs the normal dialog function.
Posted 9 years ago by Cheetah
Avatar
One more thought ... Given the escape key's behavior (first hit cancels an edit, others pass through), could the enter key be made to do the same thing, i.e. get eaten by the commit action only if there is an edit in progress?
Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hello,

We've updated the code so the Enter key is only handled if a pending change is commited. This will be included in the upcoming 2010.1 release.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 18 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.