onFocus - event of the PmfObject object
Description:
The event is triggered if the Pmf object gets or loses focus
Parameters:
| ev | (Object) Reference to an object that describes information about the event
Parameters:
| ev.SrcObject | (Object) Pmf object where the event originated. |
| ev.Type | (String) Focus type.
"in" - Pmf object got focus
"out" - Pmf object lost focus |
|---|
|
|---|
Note:
- This event is is functional only in
JavaScript language.
Example:
JavaScriptSelect and copy to clipboard
var oForm = pMe.Form;
var oString = oForm.CreateItem("string", "id_Str1", "String 1", "");
oString.Value = oForm .ClientType ? "PM Runtime" : "PM Develop";
// The function is registered into the onFocus event.
function onStringChangeFocus(ev)
{
Pm.Debug("onFocus, Type=" + ev.Type);
}
oString.AddEvent("onFocus", "Id_Str1", onStringChangeFocus);