1. David Vasconcelos
  2. PowerBuilder
  3. Wednesday, 20 May 2020 11:14 AM UTC

Just trying to confirm something.  Within a datawindow what is the default behavior for a dddw when you hit the enter key?   Currently, up and down keys scroll between rows, but if I hit the enter key nothing happens.

 

Is it suppose to select the item highlighted.

or 

does nothing (unless you code for it).

Environment.

PB2017 R3, Sybase ASE 16, Win10

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 20 May 2020 14:33 PM UTC
  2. PowerBuilder
  3. # Permalink

Greetings, David -

I believe that no action occurs by default if the Enter key is pressed when input focus is in a DW column that uses the DDDW edit style. Technically, the DW's edit control has focus, and the edit control makes no assumption that pressing the Enter key causes an AcceptText to occur. Some limited "navigation" keystrokes for the drop-down list (Up/Down arrow keys as you noted, for example) are processed. PageUp/PageDown are not.

If you want an action in a DW to occur when the user presses Enter, you have to create a user event mapped to pbm_dwnkey and place the code to check which key has been pressed in that event script. Keep in mind that if there is a command button with it's Default property enabled in the same window as the DW, the command button's Clicked event will fire when the Enter key is pressed.

Regards, John

Comment
  1. David Vasconcelos
  2. Wednesday, 20 May 2020 16:30 PM UTC
Thanks John, that's what I thought but just wanted to confirm that nothing has changed...Dave V.
  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.