View Single Post
04-15-14, 08:27 PM   #7
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by Phanx View Post
That would indicate that your stat frames are not properly parented to the main panel, since when you hide a frame, all of its children are also hidden. Make sure your stat frames are parented to the panel (or parented to something else that's parented to the panel, etc.) or post your code if you need help figuring it out.
I have attached my datapanel.lua the code is way to long to post on here. Below are some things I tried with no success.


I've tried the following:

In the main code:
Code:
if MainPanel:IsVisable() then
  -- PP Code Here
else
  return
end
The above code shows no text.


In the Stat it self:
Code:
if (MainPanel:IsVisable() ~= false) then
  PP(db.datapanel.armor, Text)
else
  return
end
The above code shows no text also.

In the stat in the game tooltip part of the code:
Code:
if MainPanel:Show() == true then
  -- Tooltip Code
else
  return
end
The above code loads the stat but shows no tooltip



The reason for 1 main panel and 3 smaller panels on top of the main panel is when setting up the locations for the stat positions it is a little over whelming to try to set up 9 locations vs making 3 panels and then only having to so a left, center and right. Then setting up the width MainPanel:GetWidth()/3 makes them all be the correct size to fit all 3 in the panel.


Thanks for taking so much time in helping me. As you can see I thinking im heading in the right direction when trying to figure out and learn new things.


When I looked up IsVisable() the example it gave me was

Code:
visable = MyObject:IsVisable()

Example:
if(MyFrame:IsVisible()) then
  MyAddon_UpdateSomeText(MyFrame);
end
So by this example I thought that the PP is the object and it was what I needed to try to hide, apparently I was wrong... again.

Thanks

Coke
Attached Files
File Type: lua Datapanel.lua (92.2 KB, 224 views)
  Reply With Quote