• 0

    posted a message on Adding info to a tooltip after sethyperlink
    I remember reading somewhere that, in order to force the tooltip to resize after changing it's content, you need to hide it, add the desired text and then show it again ie:

    local function UpdateTooltipVisibility(widget, show_tooltip)
      GameTooltip:Hide(); -- regardless of whether we are showing it or not
      GameTooltip:ClearLines(); -- same as above line
      if show_tooltip then
        GameTooltip:SetOwner(widget, "ANCHOR_TOPRIGHT", 0, 26);
        GameTooltip:AddLine("whatevers_being_added");
        GameTooltip:Show();
      end
    end


    Calling the tooltip's 'Show' method will also re-size it.
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.