Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

wrap attribute | wrap property

Sets or retrieves how to handle wordwrapping in the object.


<element wrap="p" ... >


p = object.wrap


Property values

Type: String


Default. Text is displayed with wordwrapping and submitted without carriage returns and line feeds.


Text is displayed with wordwrapping and submitted with soft returns and line feeds.


Wordwrapping is disabled. The lines appear exactly as the user types them.


To detect the difference between soft and hard you must submit the content within the textArea to an HTTP server.


This example dynamically sets the wrap property of a textArea to the value selected by the user.

Code example:

<script type="text/javascript">
function ChangeWrap(oSelect, oTA)
    cValue = oSelect.options(oSelect.selectedIndex).value;
    oTA.wrap = cValue;
... <select id="cboWrap" onchange="ChangeWrap(this, txt1)">
<option value="soft">soft</option>
<option value="hard">hard</option>
<option value="off">off</option>
<p><textarea id="txt1" style="height: 200; width: 200"></textarea> </p>

See also




© 2017 Microsoft