View Single Post
06/11/20, 06:33 AM   #3
remosito
AddOn Author - Click to view addons
Join Date: Dec 2019
Posts: 30
Originally Posted by sirinsidiator View Post
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).
Some serious necro I know.

But somebody else googling around for tooltip text alignment or width might end up here....

So...

Lua Code:
  1. --inside mouseenter function
  2. local minX, minY, maxX, maxY = InformationTooltip:GetDimensionConstraints()
  3. OrigToolTipMaxX = maxX
  4. InformationTooltip:SetDimensionConstraints(minX, minY, 500, maxY)
  5.  
  6. --inside mouseexit function
  7. if OrigToolTipMaxX ~= nil then
  8.     InformationTooltip:SetDimensionConstraints(minX, minY, RDL.OrigToolTipMaxX, maxY)
  9. end

.... 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)

Last edited by remosito : 06/11/20 at 06:38 AM.
  Reply With Quote