tableView' s标头的高度 [英] Height of tableView's header

查看:55
本文介绍了tableView' s标头的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试打印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' s标头的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆