Thread Tools Display Modes
08-10-05, 04:05 PM   #1
cs01pj
A Defias Bandit
Join Date: Jul 2005
Posts: 3
Tabbed Windows Problem

Hi,
I'm struggling to get this tutorial to work @ http://www.wowwiki.com/Advanced_Tuto...Tabbed_Windows.

I followed the tutorial to the word, but he does not show the myButtonHandler(this:GetName()); method in lua. I think this may be where my problem lies. I've spent days looking at the source code of UIPanelTemplates.LUA in the FrameXML dir. But still having trouble.

Any help showing some code snippets of how to get the tabs to work would be great. Just so I can swap between frames.

Please any help would be greatly appreciated !!
  Reply With Quote
09-08-05, 05:17 AM   #2
farang
A Deviate Faerie Dragon
 
farang's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2005
Posts: 19
Okay, maybe i can help.

I'm not at home right now ,so i can't do any testing ,but the function you want to create has to work like this:

1. extract the number from the Button pressed.

if you specify the "id" for the button ,then you can easily get it by:

local id = this:GetID();

(do a DEFAULT_CHAT_FRAME:AddMessage("ID:" .. id) for dump out the value for testing)

2. the "Hidding" part.

if you wrapped all your elements (buttons, fontstrings) inside one <frame> element ,it's easy.

For example your Frame with all the content for Page 1 is called "FramePage1", then you do something like this:

if (id == 1) then
FramePage1:Show()
FramePage2:Hide()
FramePage3:Hide()
end
if (id == 2) then
FramePage1:Hide()
FramePage2:Show()
FramePage3:Hide()
end

If you need to know how you can nest the elements inside a Frame, you can check this:

http://fara.webeddie.com/ui/
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Tabbed Windows Problem


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