ListView.LabelWrap 属性

获取或设置一个值,该值指示当项作为图标在控件中显示时,项标签是否换行。

**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)

语法

声明
<LocalizableAttribute(True)> _
Public Property LabelWrap As Boolean
用法
Dim instance As ListView
Dim value As Boolean

value = instance.LabelWrap

instance.LabelWrap = value
[LocalizableAttribute(true)] 
public bool LabelWrap { get; set; }
[LocalizableAttribute(true)] 
public:
property bool LabelWrap {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_LabelWrap ()

/** @property */
public void set_LabelWrap (boolean value)
public function get LabelWrap () : boolean

public function set LabelWrap (value : boolean)

属性值

如果当项显示为图标时,项标签换行,为 true;否则,为 false。默认为 true

备注

LabelWrap 属性设置为 true 时,如果需要,项文本会换至文本的下一行。如果文本长于两行,则文本将缩短。如果用户选择了该项,则显示所有项文本。如果 LabelWrap 属性设置为 false,则所有项文本都将显示在单独一行中。整个项文本在 LabelWrap 设置为 false 时显示。只有在 View 属性设置为 LargeIconSmallIcon 时才使用该属性。

平台

Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

ListView 类
ListView 成员
System.Windows.Forms 命名空间
View