Loading ...
Sorry, an error occurred while loading the content.

Re: TabBar actual width

Expand Messages
  • martizhen
    Thanks! tried tabBar.drawNow(),it works.
    Message 1 of 3 , Mar 13, 2012
    View Source
    • 0 Attachment
      Thanks! tried tabBar.drawNow(),it works.

      --- In ydn-flash@yahoogroups.com, Josh Tynjala <joshtynjala@...> wrote:
      >
      > I think you can listen for a ComponentEvent.RESIZE event (or something very
      > similar) on TabBar. After the listener is called, tabBar.width should be
      > accurate.
      >
      > Alternatively, try calling tabBar.drawNow() to cause it to redraw
      > immediately. After the call, check tabBar.width.
      >
      > - Josh
      >
      > On Thursday, March 8, 2012, martizhen <martizhen@...> wrote:
      > >
      > >
      > > Hi, I'm new to as3 and I'm trying to figure out how to get the actual
      > width of the TabBar object. TabButton width depends on the text content. My
      > TabBar content changes dynamically so at some stage it overflows the
      > container. I need to add a scroller when it happens but I need to know the
      > current width of my tab menu. What I need is a xPosition from drawButtons
      > method of TabBar.as. Is there any way of accessing that? Thanks in advance.
      > >
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.