通过索引而不是位置获取列宽

huangapple go评论63阅读模式
英文:

Get the column width by index instead of position

问题

我想通过索引而不是位置来获取列宽。

要获取当前查看的列的宽度,可以使用以下方法:

bodyLayer.getColumnWidthByPosition(columnPosition)

是否可以通过索引来获取列宽度?这将允许我获取不在视口内的列的列宽。我想循环遍历每一列并获取其宽度。

英文:

I would like to get the column width by index instead of position.

To get the width of columns currently viewed I can use this.

bodyLayer.getColumnWidthByPosition(columnPosition)

Is it possible to get the column width by index instead? This would allow me to get the column widths of columns that aren't within the viewport. I would like to loop through every column and get its width.

答案1

得分: 1

这只有在操作 DataLayer 这样的更深层次时才可能实现。ViewportLayer 不会返回任何当前不可见的列的宽度。这将违反 ViewportLayer 的设计。

英文:

This is only possible if you operate on a deeper layer like the DataLayer. The ViewportLayer will not return you any width of a column that is currently not visible. That would violate the design of the ViewportLayer.

huangapple
  • 本文由 发表于 2020年10月2日 00:10:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/64159258.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定