Originally Posted by CrazyDutchGuy
Does anyone know how to extract the text from a PopupTooltip ?
I can't find the text controls for the object, there are no handlers to request the information from the tooltip or the objects it is derived from.
Anyone know if it is even possible to do it ?
|
I didn't find a way. Even if I'm able to go through the lines and show or hide them, I can't get any text from them. Each line is just a container and I don't have a clue how to access its chidren.
Lua Code:
TOOLTIP_LINES = {}
local nextLine = true
local container
PopupTooltip:AddControl(WINDOW_MANAGER:CreateControl("MY_CONTROL", PopupTooltip, CT_LABEL))
local container = MY_CONTROL:GetParent()
while nextLine do
local nextLine = select(3,container:GetAnchor(0))
if nextLine == PopupTooltip then break end
table.insert(TOOLTIP_LINES, 1, nextLine)
container = nextLine
end
--inspect lines using the /zgoo TOOLTIP_LINES