| Prev | Next | Wp Verbs > wp.setDisplay |
wp.setDisplay
| Syntax |
wp.setDisplay (status)
|
| Params |
status is either true or false, depending on whether you want screen activity shown (true) or hidden (false).
|
| Action |
If status is false, "freezes" screen display so user does not see updates and cursor movements as they happen. If status is true, updates the display to reflect any changes made while it was frozen, and returns screen display to default state where user sees all changes and cursor movements as they occur.
|
| Returns |
True, unless the display mode already matches status in shich case it returns false.
|
| Examples |
This example isn't particularly interesting, but it demonstrates what wp.setDisplay does. In examples.Sample Outline 1, position the cursor on "Subhead 3, Summit 2" and then execute: origsetting = op.geDisplay () wp.setDisplay (false); startPoint = op.getCursor (); op.go (flatup, 1); msg (op.getLineText ()); clock.waitSeconds (2); op.go (flatup, 1); msg (op.getLineText ()); clock.waitSeconds (2); op.setCursor (startPoint); wp.setDisplay (orig setting)
You know that the cursor has moved up two positions in the outline but you won't see it happen because the first line of the above script freezes the screen so you don't see updates. But you'll see the text of those lines in Frontier's main window, so you |
| Notes |
You may wonder why you can't just use wp.setDisplay (false) at the beginning of such an operation and wp.setDisplay (true) at the end. If you did this and then called this verb from another one that turned the display on and then back off, you'd end up with a confusing situation. It is always better to save the current state of the screen display and then set it to where you want it, restoring it when you are finished. In general, you use wp.getDisplay and wp.setDisplay before and after an operation or set of operations that will result in the outline's display being changed in cases where you either want the user to see only the finished result, or where you are going to return the outline to its original state and don't want the user to notice that anything is happening to the outline.
|
| See Also |
wp.getDisplay
|
| Prev | Next | Wp Verbs > wp.setDisplay |