Livecode Wiki

A Message sent to a button or field when it becomes inactive (loses focus). If there is a message handler by the same name in the message path, then it will be executed.




If the control is an unlocked field or a button whose menuMode is "comboBox", the closeField or exitField message is sent to it instead of the focusOut message.

Message handler[]


on focusOut
                    -- if you set the textStyle on focusIn, use a handler like this
                    -- handler to remove the styling when the control loses focus
set the textStyle of the target to empty
end focusOut

Use the focusOut Message handler if you want to perform preparation or do other tasks when a control loses the keyboard focus.

See also: exitField, suspendStack, closeField & button.