SetElementFocus method

Moves the input focus to the specified element in the display. If the element cannot receive input focus because it is disabled, the method raises an error with Err.Number equal to gfxErrorSetFocus.
Syntax
Display
.
SetElementFocus_
Index
where
Display
– is the name of a Display object or an expression that evaluates to a Display object.
Index
– is a parameter of the type Variant that specifies which element is to be given input focus. The value of Index can be between 1 and the number of indexed elements (inclusive), or the name of the element.
Remarks
  • This method is similar to the Position command.
  • The objects that can receive input focus are NumericInput, StringInput, Recipe, Button, ActiveX controls, and any graphic objects that have object keys attached.
  • If the display is obscured by any other display, it is moved in front of any display of the same type. This is similar to issuing the PullForward command before setting the input focus to the element.
  • If this method calls an object that in not visible, focus will be placed on the invisible object. If the object is made visible, it will have focus.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal