Thread Tools Display Modes
Prev Previous Post   Next Post Next
12/05/16, 05:37 PM   #1
dorrino
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 50
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:
  1. InformationTooltip:AddLine(line, "", 1,1,1, LEFT, MODIFY_TEXT_TYPE_NONE, TEXT_ALIGN_LEFT, true)

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
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » Tooltip text alignment


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off