insertedFrame for StaticPopup_Show() not working
I want to display some easy-to-copy text in a popup dialog.
So I thought StaticPopup_Show() with an edit box as the 'insertedFrame' argument would be the straight forward way to achieve this. But for some reason, passing the frame to StaticPopup_Show() like this does not do anything at all: Lua Code:
When I look at the code of StaticPopup_Show(), I cannot see why it should not work: https://github.com/Gethe/wow-ui-sour...opup.lua#L4583 Can anybody explain this to me? Thanks! |
insertedFrame is the 5th parameter and the function doesn't do parameter substitution.
Code:
StaticPopup_Show("MY_TEST", nil, nil, nil, scrollFrame) |
Quote:
https://github.com/Gethe/wow-ui-sour...opup.lua#L4313 :-) Works perfectly now. A little follow-up question, if I may? I would like to have the "TooltipBackdropTemplate" border and background for my scroll box. Do I have to create a new frame for this, or is there a way to use both "UIPanelScrollFrameTemplate" and "TooltipBackdropTemplate" on scrollFrame at the same time? Thanks again! |
Inheriting multiple templates just requires a comma delimited list
local scrollFrame = CreateFrame("ScrollFrame", nil, nil, "UIPanelScrollFrameTemplate, TooltipBackdropTemplate") |
Thanks for the quick reply! So simple.
But apparently due to the nature of UIPanelScrollFrameTemplate this does not include the scroll bar in the box and the box is also a few pixels to small. So I guess I have to create a custom child frame of scrollFrame for TooltipBackdropTemplate after all, right? |
If it's just for Copy/Paste the scrollbar will be pretty useless when they can just CTRL-A/CTRL-C. You can probably hide the bar.
StaticPopup is using the size of the frame you passed it and the scrollbar is another frame attached to the right hand side of it in the creation of the UIPanelScrollFrameTemplate. |
Quote:
Right, I ended up doing it like this: Lua Code:
Thanks again! |
All times are GMT -6. The time now is 03:23 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI