auto-resizing the column header [message #947181] |
Tue, 16 October 2012 22:24 |
Jay Norwood Messages: 155 Registered: July 2009 |
Senior Member |
|
|
I noticed that when using large fonts that the default column header heights did not resize correctly. I used this code to fix the problem, based on the faq resize suggestion. It works fine for me. The row headers have similar problems. Maybe the real problem is that there is some hard-coded font size somewhere in the code, but this fixes it.
natTable.addConfiguration(new DefaultColumnHeaderStyleConfiguration() {
{
cellPainter = new BeveledBorderDecorator(
new TextPainter(false, true, 2, true));
}
});
and for Row Headers
natTable.addConfiguration(new DefaultRowHeaderStyleConfiguration() {
{
cellPainter = new LineBorderDecorator(
new TextPainter(false, true, 2, true));
}
});
[Updated on: Tue, 16 October 2012 23:20] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02617 seconds