Difference between revisions of "Display.mode"
Jump to navigation
Jump to search
(Created page with "<c>Display.mode</c> this property gives (or allows you to change) the mode of a Display instance. See also: displayMode === Usage Notes === When you assign a different m...") |
m (→Usage Notes) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <c>Display.mode</c> this property gives (or allows you to change) the mode of a | + | <c>[[Display]].mode</c> this property gives (or allows you to change) the mode of a |
Display instance. | Display instance. | ||
Line 10: | Line 10: | ||
subclass. You may hang onto (and work with, off-screen) a | subclass. You may hang onto (and work with, off-screen) a | ||
previous reference to the removed Display. If you want a | previous reference to the removed Display. If you want a | ||
− | reference to the new Display, be sure to assign it | + | reference to the new Display, be sure to assign it ''after'' |
assigning to the mode. | assigning to the mode. | ||
Line 16: | Line 16: | ||
<ms>display(4).mode = displayMode.pixel // set display 4 to pixel mode | <ms>display(4).mode = displayMode.pixel // set display 4 to pixel mode | ||
− | + | g = display(4) // grab a reference to it as g</ms> | |
[[Category:Mini Micro]] | [[Category:Mini Micro]] |
Latest revision as of 13:59, 5 April 2020
Display.mode
this property gives (or allows you to change) the mode of a
Display instance.
See also: displayMode
Usage Notes
When you assign a different mode, Mini Micro actually removes the Display instance from the display list, and inserts a new one of the correct Display subclass. You may hang onto (and work with, off-screen) a previous reference to the removed Display. If you want a reference to the new Display, be sure to assign it after assigning to the mode.
Example
display(4).mode = displayMode.pixel // set display 4 to pixel mode
g = display(4) // grab a reference to it as g