Show and Hide frames on button click - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
06-01-19, 10:21 PM   #1
A Defias Bandit
Join Date: Jun 2019
Posts: 2
Show and Hide frames on button click

I recently started to learn LUA and have been slowly picking a few stuff up and currently am stuck trying to progress further with what I want to do. So far I've learned to create a frame, add a button, and a couple widgets to it. I've also been able to turn the button into something like a macro using SetAttribute("macrotext1", "/wave") but I have been unsuccessful trying to figure out how to press a button that shows a new frame while hiding the current frame. Basically like almost turning a page.

I have managed to create a new frame by pressing the button but this creates a new frame outside of the existing one by doing something like this.

frame.sBtn:SetScript("OnClick", function()
		local newFrames = CreateFrame("Frame", "DragFrame", UIParent, "TranslucentFrameTemplate")
		newFrames:SetPoint("CENTER",  UIParent, "CENTER",0,-20)			
But as mentioned this only created a brand new frame. I would appreciate any help or if there is somewhere I can get this info that is easy to digest. I tried looking at other addons but the amount of code inside those folders is very overwhelming since I am not quite sure what I need to be looking for.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Show and Hide frames on button click

Thread Tools
Display Modes

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