<doc>
  <legacy_id>1615</legacy_id>
  <name>patterns</name>
  <type>property</type>
  <syntax>
    <example>set the patterns of <i>object</i> to <i>patternsList</i></example>
  </syntax>
  <library></library>
  <objects>
    <stack/>
    <card/>
    <group/>
    <field/>
    <button/>
    <graphic/>
    <scrollbar/>
    <player/>
    <image/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Appearance &amp; Positioning</category>
  </classification>
  <references>
    <property tag="borderPattern">borderPattern Property</property>
    <property tag="bottomPattern">bottomPattern Property</property>
    <property tag="backgroundPattern">backgroundPattern Property</property>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Specifies all the patterns of an <glossary tag="object">object</glossary>, in shorthand form.</summary>
  <examples>
    <example>set the patterns of button 1 to the patterns of card "Template"</example>
    <example>set the patterns of me to storedPatternsList</example>
  </examples>
  <description>
    <p>Use the <b>patterns</b> <glossary tag="property">property</glossary> to get all eight basic pattern <property tag="properties">properties</property> at once, or to set the patterns of one <glossary tag="object">object</glossary> to be the same as the patterns of another <glossary tag="object">object</glossary>.</p><p/><p><b>Value:</b></p><p>The <b>patterns</b> of an <glossary tag="object">object</glossary> is a list of pattern specifiers, one per <keyword tag="line">line</keyword>.  A pattern specifier is a built-in pattern number between 1 and 164 (corresponding to LiveCode's built-in patterns 136 to 300), or the <property tag="ID">ID</property> of an <keyword tag="image">image</keyword> to use for a pattern. LiveCode looks for the specified <keyword tag="image">image</keyword> first in the <glossary tag="current stack">current stack</glossary>, then in other open <function tag="stacks">stacks</function>.</p><p/><p>The <b>patterns</b> of an <glossary tag="object">object</glossary> contains eight <keyword tag="lines">lines</keyword>, some of which may be empty.</p><p/><p><b>Comments:</b></p><p>You can set all these patterns individually; the <b>patterns</b> <glossary tag="property">property</glossary> simply provides a shorter method of dealing with all of them at once. Each <keyword tag="line">line</keyword> of the <b>patterns</b> corresponds to one of the following pattern <property tag="properties">properties</property>:</p><p/><p>        * Line 1: the <b>foregroundPattern</b></p><p>        * Line 2: the <b>backgroundPattern</b></p><p>        * Line 3: the <b>hilitePattern</b></p><p>        * Line 4: the <b>borderPattern</b></p><p>        * Line 5: the <b>topPattern</b></p><p>        * Line 6: the <b>bottomPattern</b></p><p>        * Line 7: the <b>shadowPattern</b></p><p>        * Line 8: the <b>focusPattern</b></p><p/><p>If you leave a line blank when setting the <b>patterns</b>, the pattern <glossary tag="property">property</glossary> corresponding to that <keyword tag="line">line</keyword> is left unchanged.</p><p/><p>If the <b>patterns</b> <glossary tag="property">property</glossary> of an <glossary tag="object">object</glossary> reports a blank <keyword tag="line">line</keyword>, the corresponding pattern is not set for the individual <glossary tag="object">object</glossary>, but is <glossary tag="inheritance">inherited</glossary> from the <glossary tag="object">object's</glossary> <property tag="owner">owner</property>. Use the form<code> the effective patterns of <i>object</i> </code>to obtain the patterns used for the object, whether set for the <glossary tag="object">object</glossary> or <glossary tag="inheritance">inherited</glossary>.</p><p/><p>If a pattern is set for an object, that pattern is used instead of the corresponding color for that object.</p>
  </description>
</doc>