logo

class

fwt::Tab

sys::Obj
  fwt::Widget
    fwt::Tab
//
// Copyright (c) 2008, Brian Frank and Andy Frank
// Licensed under the Academic Free License version 3.0
//
// History:
//   16 Jun 08  Brian Frank  Creation
//

**
** TabPane is a container used organize a set of [Tabs]`Tab`.
**
class TabPane : Widget
{
  override This add(Widget kid)
  {
    if (kid isnot Tab)
      throw ArgErr("Child of TabPane must be Tab, not $kid.type")
    super.add(kid)
    return this
  }
}

**************************************************************************
** Tab
**************************************************************************

**
** Tab is the child widget of a `TabPane`.  It is used to
** configure the tab's text, image, and content widget.
**
class Tab : Widget
{
  **
  ** Text of the tab's label. Defaults to "".
  **
  Str text := "" { set { @text = val; sync(textId) } }
  internal static const Str textId := "text"

  **
  ** Image to display on tab. Defaults to null.
  **
  Image image := null { set { @image = val; sync(imageId) } }
  internal static const Str imageId := "image"

}

More Info