Tooltip text alignment
Hello, this is probably an easy question, but it feels like the solution is a bit over my level of knowledge:(
I want to add a custom tooltip onMouseEnter for my control (a label, shouldn't matter though). I sucessfully added the tooltip, now i want to have a vertical list of text strings in it (approx the same length~<=20). If i use ZO_Tooltips_ShowTextTooltip i'm getting all the text strings with center alignment and i can't figure out how to make them aligned to the left. ZO_Tooltips_ShowTextTooltip uses AddLine method. I tried to make a custom function and call AddLine as: Lua Code:
It works, but now the tooltip has a fixed width that is way higher that i would like. Making the last property to false (or nil) makes the tooltip adjust its width to the content, but reverts the alignment to center. How can i get the tooltip to adjust its width while making the text entries there left-aligned? ZO_Tooltips_ShowTextTooltip does perfectly what i need besides of the alignment part. Thank you:) |
ZO_Tooltips_ShowTextTooltip also just calls AddLine:
Lua Code:
The last parameter of AddLine is called setToFullSize: Quote:
You could also try to set a width constraint and setToFullSize, but you should only do that if you have created the tooltip control yourself (never on the built in InformationTooltip and others). |
Quote:
But somebody else googling around for tooltip text alignment or width might end up here.... So... Lua Code:
.... is a bad idea? (Apart from using 500 instead of a constant/variable ;) ) is setting it back to before value even needed? Or will initialize on the next tooltip just set it to previous defaults anyway? (better save than sorry, so I just put it in) |
All times are GMT -6. The time now is 05:49 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI