tableView的标题高度 [英] Height of tableView's header
本文介绍了tableView的标题高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试打印TableView,因为它无法放入一个A4页面,我想使用多个记录(行),行高和标题高度将其拆分为多个页面。
I am trying to print a TableView, and because it cannot fit in one A4 page, I want to split it in many pages, using number of records (rows), row height, and header height.
现在我的问题是如何获得标题的高度?
Now my problem is how to get the height of the header ?
推荐答案
尝试
double height = table.lookup(".column-header-background").getBoundsInLocal().getHeight();
这仅适用于在表格上执行布局后,以及应用任何CSS之后。
This will only work after layout has been performed on the table, and after any CSS has been applied.
这篇关于tableView的标题高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文