A FunctionKey object represents an individual Function Key on the form.
Newlook Smartclient
Newlook Server
An individual function key represents an item in the FunctionKeys collection of a Form.
By default, Newlook automatically converts all recognized host screen function key fields into function key controls on the GUI form. This provides end users with the option of clicking a form button in addition to the traditional method of pressing a function key on the keyboard.
It is possible to extend the functionality of forms by adding custom function keys with associated logic assigned to them. For instance, a developer may wish to add further screen navigation links, pass information to a desktop application or open a custom form.
Custom function keys can be added via the Add Function Key menu item on the right-click context menu in Designer.
To access properties of a function key, make sure that the Properties pane is open and select the function key in Designer.
To apply function keys to numerous newlook generated host screens, you will need to make use of generic overrides. This involves using Identify to label all required screens with the same screen ID prior to adding the function key in Designer.
It is not possible to remove function keys that are automatically generated by the host.
The Add method can be used with the function keys collection to dynamically insert a new function key onto the screen. This method is typically used with the OnReceive event of the form to provide users with custom function keys. Note that it is not possible to assign a macro or script to a dynamically added function key. To do this you will need to add the function key via the Edit | Function Keys menu in Designer. The Remove method can be used to delete custom function keys. Note that it cannot be used to remove function keys that are generated by the host application, only dynamically added function keys. If you wish to hide a function key on a form you will need to set it's visible property to False and assign the script that does this to the OnReceive and OnRefresh events of the form.
There are times when you may wish to modify the properties of a function key.
A function key is an object like all other objects in newlook. It's properties can be manually modified in the Properties pane.
You may wish to only edit the properties of a function key under certain scenarios. Examples of this include disabling a function key when the focus is on a field where that function key is not relevant. Use the following syntax to reference an individual function key (where x is the item in the function keys collection you are modifying):
App.ActiveForm.FunctionKeys(x).Property
The following properties can be returned for each FunctionKey object:
Newlook Smartclient |
Newlook Server |
Deprecated
|
Obsolete
Property |
Client support |
Description |
|
Gets or sets the enabled state of the object. |
|
|
Gets or sets the name of the macro or script to be run when the Click event is triggered. |
|
OutputKey |
|
Sets or Returns the specific Aid Key value that will be sent to the host when the Function Key is clicked. This property also dictates the icon that will display on the Function Key. |
SendKey |
|
A Boolean, which determines whether the key, specified in the OutputKey property, will be sent to the host as a result of pressing the function key. |
|
Gets or sets the file name of the image to display in the control or form. |
|
|
Gets or sets the current value of the control or object. |
|
|
Gets or sets whether the control, object or form is visible or hidden. |
FunctionKeys property | FunctionKeys collection
© 2004-2021 looksoftware. All rights reserved.