Why tooltip can auto extend width, but height can't?
Posted: Mon Nov 14, 2011 04:00
hello,
I have a question about when text length is too long, the tooltip will extend it's width automatic.
And if I set the tooltip's max size, I can use <WordWrapLeftAligned> let it change line automaticlly,too.
But when it change line, the tooltip's height doesn't extend itself.
I can only use a very stupid way to solve this problem, "getTextSize()" "getFont()" "getFontHeight()"
Calculate how many rows do I need, and setWindowSize() manually.
But it's not a good way, and I found that it can't satisfy my demand, if the text is very very long, my calculation will lost it's effect, the height by calculation is not enough.
Is there some way can do in the .looknfeel, so that it can auto extend the tooltip's height?
thanks for your help
I have a question about when text length is too long, the tooltip will extend it's width automatic.
And if I set the tooltip's max size, I can use <WordWrapLeftAligned> let it change line automaticlly,too.
But when it change line, the tooltip's height doesn't extend itself.
I can only use a very stupid way to solve this problem, "getTextSize()" "getFont()" "getFontHeight()"
Calculate how many rows do I need, and setWindowSize() manually.
But it's not a good way, and I found that it can't satisfy my demand, if the text is very very long, my calculation will lost it's effect, the height by calculation is not enough.
Is there some way can do in the .looknfeel, so that it can auto extend the tooltip's height?
thanks for your help