FANDOM


Sets the lockScreen property to true, temporarily preventing the screen from being updated.Syntax:

lock screen [for visual effect] [in rect <rect>]

Examples:

lock screen
   hide image 1
unlock screen
lock screen for visual effect
   show control 1
unlock screen with visual effect "dissolve"
lock screen for visual effect in rect (the rect of control 1)
   show control 1
   show image 1
unlock screen with visual effect "dissolve"
if the shiftKey is not down then lock screen

Use the lock screen command to rearrange items on the screen or to change locations without the user seeing the transition.

Use the (optional) 'for visual effect' variant of the lock screen command if you want to subsequently unlock the screen using a visual effect.

Use the (optional) 'rect' parameter of the lock screen command if you want to subsequently unlock the screen using a visual effect in a particular area of the screen.

A handler may need to open a stack and then close it before the handler is completed, or to move or change the appearance of a number of objects on the screen. If the screen is locked before these changes occur, the user does not see the changes happen on screen. Locking the screen can prevent user confusion or unsightly screen flashing. It also increases the speed of the handler, since LiveCode does not have to redraw all the intermediate states of the screen.

The lock screen command sets the lockScreen property to true. When all pending handlers are finished executing, the lockScreen property is set back to false and the user sees the current state of stack windows on the screen.

When using script debug mode, the screen cannot be locked and the lock screen command has no effect.

Parameters:

  • rect: (optional) A string containing the rect of the object represented as 4comma separated values. left, top, right, bottom. (0,0,100,100).

See also: lock messages (command),lock colorMap (command),allowFieldRedraw (property),alwaysBuffer (property),