1 Reply Latest reply on Sep 16, 2007 9:58 PM by raghunathrao

    Techniques for closing tabs

    mahatmakain7
      Hello everyone,

      I'm new to Flex, and I've worn myself out trying to figure out how to add a "close" control in a tab (beside the label) so users can close that tab by clicking. The functionality I'm striving for is similar to Yahoo's new Mail product, where each tab has a little "x" next to the label.

      I've tried everything I can think of... it's no trouble to put a link button or any other clickable item in the main container area of the tab, and have that do a RemoveChild(), but trying to call that function from the tab text? I just can't crack that nut. I suspect it may require capturing the Change event of the ViewStack, and then conditionally calling the destroyer that way, but... then there's still the problem of putting an icon next to the label and calling the method from that.

      Anyone able to shed some light on this? Anyone? Anything? I need to go cry now.

      Thanks,

      Mike