nsITreeColumns 编辑

The nsITreeColumns interface represents the tree columns.

layout/xul/base/src/tree/public/nsITreeColumns.idlScriptable Please add a summary to this article.   Last changed in Gecko 1.9 (Firefox 3)

Inherits from: nsISupports

Method overview

nsITreeColumn getColumnAt(in long index);
nsITreeColumn getColumnFor(in nsIDOMElement element);
nsITreeColumn getFirstColumn();
nsITreeColumn getKeyColumn();
nsITreeColumn getLastColumn();
nsITreeColumn getNamedColumn(in AString id);
nsITreeColumn getPrimaryColumn();
nsITreeColumn getSortedColumn();
void invalidateColumns();
void restoreNaturalOrder();

Attributes

AttributeTypeDescription
countlongThe number of columns. Read only.
lengthlongAn alias for count (for the benefit of scripts which treat this as an array). Read only.
treensITreeBoxObjectThe tree widget for these columns. Read only.

Methods

getColumnAt()

Get the column for a given index.

nsITreeColumn getColumnAt(
  in long index
);
Parameters
index
Index of the column
Return value

A nsITreeColumn for this index.

getColumnFor()

Get the column for a given element.

nsITreeColumn getColumnFor(
  in nsIDOMElement element
);
Parameters
element
A DOM element
Return value

A nsITreeColumn for this element.

getFirstColumn()

Get the first column.

nsITreeColumn getFirstColumn();
Parameters

None.

Return value

The first nsITreeColumn.

getKeyColumn()

Get the key column.

nsITreeColumn getKeyColumn();
Parameters

None.

Return value

The key nsITreeColumn.

getLastColumn()

Get the last column.

nsITreeColumn getLastColumn();
Parameters

None.

Return value

The last nsITreeColumn.

getNamedColumn()

Get a column for a given name.

nsITreeColumn getNamedColumn(
  in AString id
);
Parameters
id
A column id
Return value

The nsITreeColumn for this id.

getPrimaryColumn()

Get the primary column.

nsITreeColumn getPrimaryColumn();
Parameters

None.

Return value

The primary nsITreeColumn.

getSortedColumn()

nsITreeColumn getSortedColumn();
Parameters

None.

Return value

A nsITreeColumn.

invalidateColumns()

This method is called whenever a treecol is added or removed and the column cache needs to be rebuilt.

void invalidateColumns();
Parameters

None.

restoreNaturalOrder()

Restore the original order of the columns before the user moved them.

void restoreNaturalOrder();
Parameters

None.

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:54 次

字数:7773

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文