focus | |||||||
Type | command | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Summary | Places the insertion point in a field, makes a control active, or removes focus from all controls. | ||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Parameters |
| ||||||
Example |
| ||||||
Related | Property: focusPattern, showFocusBorder, lockText, selected, lookAndFeel, focusColor, traversalOn Message: enterKey, focusIn, keyUp, tabKey, mouseLeave, mouseWithin, keyDown, focusOut, returnKey Keyword: control Glossary: property, EPS, error, insertion point, message, unlock, appearance, active control, command Function: focusedObject, mouseStack Command: select, focus Object: field, image, button | ||||||
Description | Use the focus command to make a control active--that is, to make it receive any keystrokes the user types. If the object's traversalOn property is false, it cannot receive the focus, and the focus command causes an error. If the lookAndFeel is set to "Motif", the focusedcontrol is outlined, and the control receives any keystrokes (and the messages associated with them). If the lookAndFeel is set to "Appearance Manager" or "Macintosh", an outline is drawn around fields, images, and EPS objects whose showFocusBorder property is set to true. Otherwise, the appearance of the focused control does not change, but it receives keystroke messages. If the lookAndFeel is set to "Windows 95", a dotted outline is drawn within buttons when they receive the focus. If the object is an unlocked field, the insertion point is restored to the location at which it was located the last time the field was focused. If the field was not previously focused, then the insertion point is placed at the beginning of the text in the field. Use the | ||||||
Tags | ui |