Navigation menu

WoW:API Region IsShown: Difference between revisions

Jump to navigation Jump to search
m
Move page script moved page API Region IsShown to WoW:API Region IsShown without leaving a redirect
mNo edit summary
m (Move page script moved page API Region IsShown to WoW:API Region IsShown without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{widgetmethod}}
{{widgetmethod}}
Determine if the object is "shown" (would be visible if its parent was visible).
Determine if the object would be visible if its parent was visible.


  shown = MyObject:IsShown();
  shown = MyObject:IsShown();
Line 6: Line 6:
== Returns ==
== Returns ==


:;shown: [[Boolean]] - true if the object will be visible when its parent is visible.
:;shown: [[boolean]] - true if the object will be visible when its parent is visible.


== Example ==
== Example ==
Line 17: Line 17:
== Details ==
== Details ==


:Calling [[API Region Show|:Show]]() on an object will make subsequent calls to IsShown() return ''true''. Likewise, calling [[API Region Hide|:Hide]]() will make subsequent calls to IsShown() return ''false''.
Calling [[API Region Show|:Show]]() on an object will make subsequent calls to IsShown() return ''true''. Likewise, calling [[API Region Hide|:Hide]]() will make subsequent calls to IsShown() return ''nil''.


:When an object is initialized, the return value of IsShown() is determined by the XML-attribute "hidden" for the object.
When an object is initialized, the return value of IsShown() is determined by the XML-attribute "hidden" for the object.
:Objects created via [[API CreateFrame|CreateFrame]](), [[API Frame CreateFontString|Frame:CreateFontString]]() or [[API Frame CreateTexture|Frame:CreateTexture]]() are initially created shown.


== History ==
Objects created via [[API CreateFrame|CreateFrame]](), [[API Frame CreateFontString|Frame:CreateFontString]]() or [[API Frame CreateTexture|Frame:CreateTexture]]() are initially created shown.


:Prior to patch 1.9, FontStrings did not have an :IsShown(). They did have an :IsVisible() method with the behaviour of :IsShown().
== Notes ==
* Prior to patch 1.9, FontStrings did not have an :IsShown(). They did have an :IsVisible() method with the behaviour of :IsShown().
 
== See also ==
* {{api|Region:IsVisible|t=w}}
Anonymous user