Applies to

Interactive controls

Description

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

Usage

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.

Remarks

Values passed in Set_Property:

ValueDescription
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.

Returns

Values returned by both Get_Property and Set_Property:

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

See Also

PREVFOCUS property

  • No labels