WAP之家:为您提供最全最新的WAP技术,CP.SP.3G等行业资讯。 WAP之家交流论坛全新开放 点击进入>>
WAP资讯 | 3G动态 | SP动态 | 运营商动态 | 内容商动态 | 制造商动态 | 论坛讨论>> 每次自动访问
WAP技术 | WAP源码 | 手机编程 | 手机源码 | 无线技术 | J2ME技术 | 手机软件 添加到收藏夹
IVR技术 | SP资料 | SMS MMS技术 | 商业方案 | IVR下载 | 书籍教程 | 工具软件 语言:繁體中文

WAP之家技术文章WAP教程网站教程ASP.NET Mobile TextView Control

ASP.NET Mobile TextView Control
作者:佚名  来源:本站整理  发布时间:2008-3-14 20:48:29

Definition and Usage
定义和用法

The TextView control is used to create a multi-line input box on a mobile device.
TextView空间的作用是:在移动设备中创建一个可进行多行输入的文本框。

The text can be specified by the text attribute or as the content of the TextView element. If the text is specified in both ways, the inner text takes precedence. However, if the text is programmatically set, the inner text is replaced with this text.
该文本可以通过文本属性指定,或者作为TextView元素的内容来指定。如果同使用上述两种方法来指定,那么将优先处理内置文本。然而,如果文本使用程序自动设置的,那么内置文本将被该输入文本所取代。


Properties
属性

Property
属性
Value
Description
描述
Alignment left
center
right
Optional. How to align the textbox
可选参数。指定文本框的对齐方式
BackColor rgb(x,x,x)
#xxxxxx
colorname
Optional. A background color for the textbox
可选参数。指定文本框的背景颜色
ForeColor rgb(x,x,x)
#xxxxxx
colorname
Optional. A foreground color for the textbox
可选参数。指定文本框的前景颜色
Font-Bold false
true
Optional. Specifies whether or not the text in the textbox should be bold
可选参数。指定文本框中的文本字体是否以粗体显示
Font-Italic false
true
Optional. Specifies whether or not the text in the textbox should be italic
可选参数。指定文本框中的文本字体是否以斜体显示
Font-Name fontname Optional. Specifies the font name of the text in the textbox
可选参数。指定文本框中文本的字体名称
Font-Size normal
small
large
Optional. Specifies the font size of the text in the textbox
可选参数。指定文本框中的字体尺寸大小
id unique_name Optional. A unique id for the control
可选参数。为控件指定一个独立的id
runat "server" Required. Specifies that the control is a server control
必要参数。指定该控件是否为服务器控件
StyleReference name_of_style_element Optional. Specifies a reference to a style to be applied to the control
可选参数。指定一个应用于控件的样式参数
Text text Optional. The text to display in the textbox
可选参数。指定在文本框中显示的文本
Wrapping wrap
nowrap
Optional. Specifies whether or not the text in the textbox should wrap
可选参数。指定文本框中的文本是否允许被嵌套

Example 1
案例1

The following example will declare one form in an .aspx file. The form has a TextView control containing a long text:
下面的案例将在aspx 文件中创建一张表单。该表单包含一个TextView 控件(该空间还包含一个长文本):

<%@ Page
Inherits="System.Web.UI.MobileControls.MobilePage"%>
<%@ Register TagPrefix="Mobile"
Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<Mobile:Form runat="server">
<Mobile:TextView runat="server">
This is a very long text to demonstrate
how text can be displayed over several screens.
This is a very long text to demonstrate
how text can be displayed over several screens.
This is a very long text to demonstrate
how text can be displayed over several screens.
This is a very long text to demonstrate
how text can be displayed over several screens.
</Mobile:TextView>
</Mobile:Form>

Example 2
案例2

The following example will declare one form in an .aspx file. The form has a TextView control containing a long text. The text will be centered on the page and displayed in italic:
下面的案例将在 .aspx文件中声明一张表单。该表单包含一个TextView 控件(该空间还包含一个长文本)。该文本将在页面内居中对齐,并以斜体字显示:

<%@ Page
Inherits="System.Web.UI.MobileControls.MobilePage"%>
<%@ Register TagPrefix="Mobile"

Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<Mobile:Form runat="server">
<Mobile:TextView runat="server" alignment="center"

font-italic="true">
This is a very long text to demonstrate
how text can be displayed over several screens.
This is a very long text to demonstrate
how text can be displayed over several screens.
This is a very long text to demonstrate
how text can be displayed over several screens.
This is a very long text to demonstrate
how text can be displayed over several screens.
</Mobile:TextView>
</Mobile:Form>

[] [返回上一页] [打 印]
文章评论

用户名: 查看更多评论

分 值:100分 85分 70分 55分 40分 25分 10分 0分

内 容:

         (注“”为必填内容。) 验证码: 验证码,看不清楚?请点击刷新验证码