2.132 .focus_on_click

This attribute defines if a mouse click into an object’s client area activates the object, i.e. sets the focus on it.

Definition

  • Data type

    boolean

  • Access

    get, set

  • changed event

    no

Value range

true
A mouse click activates the object and focuses the object or one of its children.
false
A mouse click does not activate the object and the focus remains unchanged.

The main purpose of the attribute is to define toolbars that do not pull the focus out of the related window when the toolbar is clicked with the mouse. Take into consideration that a grouping object with .focus_on_click = false should not contain objects, which may gain the focus or even require it for input (e.g. edittext).

The attribute can only be used on Microsoft Windows.