lockScreen | |||||||
Type | property | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Summary | Specifies whether changes to a stack appear on the screen. | ||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Example |
| ||||||
Values |
| ||||||
Related | Keyword: card Property: properties, lockCursor Command: unlock screen, topLevel, palette, modal, reset, go, show cards, modeless Function: stacks Glossary: object, property, stack window, handler, execute, statement, redraw, script debug mode, command Object: stack, card | ||||||
Description | Use the lockScreen property to control when changes to the appearance of objects appear to the user, or to speed up actions that change several objects. If the lockScreen property is set to true, statements that affect the appearance of the stack windows--such as opening or closing a stack, going to another card, or changing properties of an object --are not shown on the screen until the lockScreen is set back to false. If the lockScreen is false, all changes are displayed immediately. Setting the lockScreen to true also speeds up handlers that affect the screen appearance. Since LiveCode does not need to take time redrawing its windows when the lockScreen is true, a handler that visits several cards in a row or changes several objects runs faster if the lockScreen property is set to true while the changes are made. The lockScreen property is automatically set to false when a palette, modeless, or modal stack is opened, even if a handler is still running.
LiveCode keeps count of how many times the screen has been locked. You must balance each unlock with a lock; if you lock the screen twice and then unlock it once, the screen remains locked. For example, the following pair of handlers draws everything while the display is still locked:
| ||||||
Tags | ui |