Applies to

Interactive controls


Used to determine if a control has focus, or to set focus to a control. Returns the name of the object that has focus.


focusobject = Get_Property (windowname, "FOCUS")

currentfocus = Get_Property ("SYSTEM", "FOCUS")

If the window specified in windowname is not active, then focusobject will be the object that will get focus as soon as the window is activated.

existingprop = Set_Property(objectname, "FOCUS", value)
existingprop = Set_Property("SYSTEM", "FOCUS", appwindow)

In the first method, Set_Property suppresses all events generated because of focus change; the second method does not.


Values passed in Set_Property:

ValueA Boolean value (1 or 0, where 1 means that the control will have focus and 0 means that no control will have focus).
objectnameName of control in windowname to receive focus.
appwindowName of window, in a multi-window application.


Values returned by both Get_Property and Set_Property:

focusobjectControl, in the current window, that has focus.
existingpropObject with focus, when Set_Property was run.

See Also

PREVFOCUS property

  • No labels