WoW:API Region IsShown

Revision as of 04:20, 31 January 2006 by WoWWiki>Maldivia
IsShown

Determine if the object is shown (would be visible if its parent was visible).

LayoutFrame:IsShown();

Arguments
nil

Returns
Boolean

Example
if MyFrame:IsShown() and not MyFrame:IsVisible() then
    -- Frame is shown, but not visible (one or more of its parents isn't shown)
elseif MyFrame:IsVisible() then
    -- Frame is both shown and all it's parents are shown aswell
end

Description
Gets the shown state of an object.
Calling Show() will make subsequent calls to IsShown() return true, likewise, calling Hide() will make subsequent calls to IsShown() return false.
When the frame is initialized, the return value of IsShown() is determined by the XML-attribute "hidden" for the object.
Note: in patch 1.9 this method was added to FontStrings aswell, which previously only had an IsVisible() method with the behaviour of IsShown(). The patch changed the behavior of FontString:IsVisible() to be the same as LayoutFrame:IsVisible().

Template:WoW API