Focus Method (HTMLCONTROL)


10.0A, PLBCMP GUI Only

 

The Focus method changes focus to a low level HTML element in an HTMLCONTROL object. The method sets the keyboard focus to the HTML element that has an id attribute that matches the id parameter. This method uses the following format:

 

[label]

{object}.Focus

[GIVING {return}] USING [*Id=]{id}][,[*Flags=]{flags}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A HTMLCONTROL that has been created.

return

Optional. A Numeric Variable that always returns zero.

Id

Required. A Character String Variable or literal that contains the HTML element id attribute.

flags

Optional. A Numeric Variable or decimal value that specifies a bit mask value that controls the behavior of this method.

Flags Affected: OVER, ZERO

Note the following:

  1. This method changes the keyboard focus to a HTML element contained in a HTMLCONTROL object.

  2. The ZERO flag is always set TRUE.

  3. The OVER flag is always set FALSE.

  4. The {id} is a value that determines the HTML element that will receive the focus. The {id} string is matched against the id attribute of the HTML element.

  5. The {flags} parameter is a bitmask value that forces specialized behaviors for the execution of this method.

  6. The {return} value will always be zero.

Example of Focus Method:

 

     HtmlControl.Focus Using "MyEdit"

 

In this example, the focus is set to the HTML element with the id attribute of "MyEdit".

 

 

See Also: HTMLControl Methods, Method Syntax



PL/B Language Reference ContextMenu Method (HTMLCONTROL) GetAttr Method (HTMLCONTROL)