Hi team,

In my application users can navigate through multi-row panels by clicking on icons that call the api_datasource.nextRow and previousRow procedures. When they click on the icon "down" in the last row, automatically a new row is initialized. During that initialization the key, foreign keys and default values are being set. So very important.

They can, however, also navigate through the rows by pressing the down and up arrow on their keyboard. Now i want to implement the same behaviour as clicking the next-row icon. So, when they press the down arrow while being in the last row, a new row must be initialized.

How can i catch the events when they press the down and up arrows?

I have tried keyCombination="DOWN", "ARROW DOWN" and "ARROWDOWN" but that does not work....

asked 27 Sep, 10:50

Jan%20Willem%20Vermeer's gravatar image

Jan Willem V...
1231436
accept rate: 0%


Hi Jan Willem,

The keyCombination has to be "DOWN" as in the following example. I tried and it is working. However, the focus has to be on one of the components of the panel in order the key events to be fired.

<panel>
  <events>
    <keyEvents>
      <keyEvent keyCombination="UP" action="keyActionUP" />
      <keyEvent keyCombination="DOWN" action="keyActionDOWN" /> 
    </keyEvents>
  </events>
  <tableLayout>
    <row>
      <cell>
        <button label="Test Button" />
      </cell>
    </row>
  </tableLayout>
</panel>

Kind Regards,
Serdar

link

answered 03 Oct, 08:08

Serdar's gravatar image

Serdar ♦♦
100k4
accept rate: 14%

Hi Serdar, i have tried it this way and also as an key-event in the mainFrame. Both do not work.

It only works when i add it to the events within the GRID. However, then the focus is always lost after navigating to the next row.

Kind regards, Jan Willem

(03 Oct, 09:29) Jan Willem V...
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2
×2
×1

Asked: 27 Sep, 10:50

Seen: 51 times

Last updated: 03 Oct, 09:29


© Copyright Gerger 2017