On Screen Keyboard

Hi All,

I’m attempting to create an on-screen keyboard that we can later modular use for data entry via touch screen. The problem I’m running into, is this screen has 3 fields on it. I’d like to be able to have the use click to the first field, punch away on the on screen, select the next field, repeat. I’m trying to figure out a way to know which of the 3 fields I’m currently in, so I know where to put my data during a button push. I’m also wondering is there a way to detect what button fired my method? I need some way of telling which button of value was pressed on my screen.

Many thanks!

Hi chico,

You can use an onFocusGained event on the fields to set a global with the fieldname you just entered. Using application.getMethodTriggerElementName() you can get the name of the element (if you set one that is).
You can use the same function for your buttons just make sure you set the name properties.

Hope this helps.

Hi Robert,

Your tips worked great thank you. I’m running into a slight issue thats similar though. We have multiple rows on a layout, which is brought into our main screen via a tab panel. So this tab panel has multiple rows with one field per row on it, that needs a value. Trying to maintain this on screen keyboard concept, I understand how to pull the triggered element name, but how can I get the element on the correct row?

Thanks!

To get the current selected row you simply use controller.getSelectedIndex().
This will return the row number, not the PK or anything, just the row number in your foundset.

Hope this helps.

Hi Robert,

I guess I should rephrase, I know with a single record method, I just field_name += mybutton_pressed_value.

In this multi row setup, should I just select the row prior to setting the value and that will place the value correctly?

Thanks!

Doing the same thing but then setting it:

controller.setSelectedIndex(index)

Of course you need to know which row you need to select.

Hope this helps.