
788
|
Chapter 40: The System.Web.UI.MobileControls Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
TextView
System.Web.UI.MobileControls (system.web.mobile.dll)
.NET 1.1, disposable
class
The TextView control is similar to the Label in that it provides a control that displays text
which you can programmatically modify through the Text property. However, the Text-
View also has the ability to subdivide its content over multiple pages automatically. If
the TextView is on a Panel or Form which has its Paginate property set to True, the text it
contains will automatically be divided into distinct TextViewElement objects, one for each
page. You can access individual TextViewElement instances using the GetElement( ) method
(and supplying an index number), and you can use properties like FirstVisibleElementIndex
and LastVisibleElementIndex to examine the pagination that has been applied automatically.
You can use insert markup tags directly into the text of a TextView. Supported tags
include <a> (anchor), <b> (bold), <i> (italic), <br> (line break), and <p> (paragraph).
These tags will be rendered in a device-independent manner, which means that a <p>
could conceivably be translated into a <br> tag if required by the client device. In order
to ensure compatibility across a broad range of devices, all other tags are ignored, and
will ...