Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-13-15, 07:46 AM   #1
Malsomnus
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Apr 2013
Posts: 203
Mystery of the Disappearing X

My add-on has this frame which has a little X in the corner to close it.
The frame shows automatically on login.
When I just login, everything's fine. When I /reload, however, the X does not show. It's there, it's clickable, it works, but it's invisible.
I can make it visible again by changing its text.
Does anybody have any idea what the hell?



Lua Code:
  1. f.btnX = CreateFrame ("EditBox", nil, f)
  2. f.btnX:SetPoint ("TOPRIGHT", f, "TOPRIGHT")
  3. f.btnX:SetSize (10,12)
  4. f.btnX:SetTextColor (1.0,0.77,0.27,1.0)
  5. f.btnX:SetTextInsets (0, 0, 2, 2)
  6. f.btnX:SetFont ("Fonts\\FRIZQT__.TTF", 11)
  7. f.btnX:SetAutoFocus (false)
  8. f.btnX:Disable ()
  9. f.btnX:SetText ('x')
  10. f.btnX:SetScript ("OnMouseDown", function (self, button)
  11.     f:Hide ()
  12. end)
__________________
SanityCheck - If you've ever said the words "Sorry, I forgot" then you need this add-on.

Remember, every time you post a comment on an add-on, a kitten gets its wings!
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Mystery of the Disappearing X


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