CAPTURE KEYBORAD FUNCTON KEY F1 ->F12

Hi Guys,

I am progressing in SERVOY programming. I needs help in the following areas:

a) How to capture the keyboard function key F1 - F12 and to perform
certain method when pressed by user. I known FMP cannot capture
the function unless using 3rd party utility. It is very important for me
to use the function key as user refuse to use mouse for data entry and
prefer pressing function key to certain than using mouse.

b) How to change the size of title column of portal ? I try to change it
using HTML text but it still back to default size.

c) In value list that show 2 fields, eg - Supplier Code & Name, but only
Supplier code is set to return in dataprovider. It is possible to return
supplier code only to form1.SupplierCode & supplier name to
form1.SupplierName ? At present return string to form1.SupplierCode
is the joinging of supplier Code & Name.

Thanks in advance.

SV-Kelvin:
Hi Guys,

I am progressing in SERVOY programming. I needs help in the following areas:

a) How to capture the keyboard function key F1 - F12 and to perform
certain method when pressed by user. I known FMP cannot capture
the function unless using 3rd party utility. It is very important for me
to use the function key as user refuse to use mouse for data entry and
prefer pressing function key to certain than using mouse.

Try the menubar plugin of It2Be, I think that plugin can caputure keys, or create shortcuts with keys

b) How to change the size of title column of portal ? I try to change it
using HTML text but it still back to default size.

The size of the title column depends on the size, how big you made in design-mode!

c) In value list that show 2 fields, eg - Supplier Code & Name, but only
Supplier code is set to return in dataprovider. It is possible to return
supplier code only to form1.SupplierCode & supplier name to
form1.SupplierName ? At present return string to form1.SupplierCode
is the joinging of supplier Code & Name.

No I don’t think so, but you can always duplicate that valuelist. One which is returning the code and one that is returning a string, or whatever.

Thanks in advance.[/quote]

a) How to capture the keyboard function key F1 - F12 and to perform
certain method when pressed by user. I known FMP cannot capture
the function unless using 3rd party utility. It is very important for me
to use the function key as user refuse to use mouse for data entry and
prefer pressing function key to certain than using mouse.

Yep, the menubar plugin will do the trick for you. You can completely manipulate the menubar and add a menu with items where you set the accelerator key to ‘typed F1’ etc. Servoy Components – Plugins, Beans, Web Components, Angular Services & Servoy Developer Consulting

a) How to capture the keyboard function key F1 - F12

You can also use the built in Command(Apple) or Control(Windows) + number and assign methods to them. I use this for all navigation; going from tab panel to tab panel, from row to row within portals, etc. Works great.

c) In value list that show 2 fields, eg - Supplier Code & Name, but only
Supplier code is set to return in dataprovider. It is possible to return
supplier code only to form1.SupplierCode & supplier name to
form1.SupplierName ? At present return string to form1.SupplierCode
is the joinging of supplier Code & Name.

There are many ways around this without going to two separate fields if you want. The user can enter the data in a global field and then the respective values get parsed out into the actual Code and Name colums. Use an ‘OnDataChange’ method to set the value in Supplier.Name based on what was selected in Supplier.Code. Have them both be the same actual column and set to return Supplier.ID (or Supplier.Code) but show either Supplier.Code or Supplier.Name respectively. Lots of ways.

john.allen:

a) How to capture the keyboard function key F1 - F12

You can also use the built in Command(Apple) or Control(Windows) + number and assign methods to them. I use this for all navigation; going from tab panel to tab panel, from row to row within portals, etc. Works great.

I am still new in Servoy. I still cannot figure out how to assing method to
Control + Number. I can’t find it in dev. ref guide. Will apprecaite your help.

Thanks.

I can’t find it in dev. ref guide.

Don’t worry. Being new to Servoy you will soon get used to the fact that the development of new features and enhancements takes place at somewhat breath-taking pace. It takes those doing the documentation a little while to catch up! This feature was only finalized in 2.2.1 which came out mid-October (although it was available in the beta releases sometime earlier). Basically all your global methods are mapped to the control/cmd + 1-9 keys. They are arranged in alphabetical order so if you have more than 9 global methods you will want to name them somewhat carefully to get the right order. Using the underscore (‘_’) character followed by the number and then followed by your name will put them in the order you want. See the Forum under announcement of 2.2.1:

[enh]-Control/CMD 1-9 shortcut mappings to first nine global methods listed in the menu