Property Name

CLASS: TabLayers

SUPER CLASS: Layers

Subclasses

No subclasses found

Synopsis

The TabLayers widget is a Layers widget (Layers) for adding tabbed layers. If you decide you don't want to use tabbed layers, you can easily switch to another style of layer by changing the layersType property.

Full Description

Properties

TabLayers.add

described in Layers

This button adds a new layer to the currently selected layer container (e.g., collection of tab or accordion layers).

TabLayers.border

described in Control

Sets the border-width in pixels for your widget. Enter a single value like 5 to have a 5 px border around the widget. To have borders with different widths, enter a comma-separated list of pixel values like this:

border-top, border-right, border-bottom, border-left

For example, entering

10, 0, 5, 1

Will result in a border that is 10px wide on top, 0px wide on the right, 5px wide on the bottom and 1px wide on the left.

Use within the javascript editor

this.<WidgetID>.setBorder("5,0,10,15")

TabLayers.borderColor

described in Control

Enter a border color for your widget; rgb and hex values are accepted: rgb(0,255,0) and #00FF00 are both valid entries.

You can also enter css color names, including black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white.

Use within the javascript editor

this.<WidgetID>.setBorderColor("rgb(0,255,0)");       
this.panel1.setBorderColor("#00FF00");
main.editor2.setBorderColor("purple");

TabLayers.defaultLayer

described in Layers

This property specifies which tab or accordion layer will be showing when the application is first run.

TabLayers.height

described in Control

The height of your widget can be specified in px or % (i.e 50px, 75%).

You can have a column of widgets that combined are more than 100% width; components will be allocated space based on the ratio of sizes (a 80% height widget gets twice as much space as a 40% widget).

Use within the javascript editor

this.<WidgetID>.setHeight("50%");  
this.label1.setHeight("40px");

TabLayers.imageList

described in Container

Enter the name of a wm.ImageList you've added to your model. This ImageList will be used by all buttons that specify an imageIndex. If a button also specifies its own ImageList, then it will ignore the container's ImageList.

TabLayers.layersType

described in Layers

This property defines how the layers will be displayed

  1. Layers: shows the default layer on top. Movement between layers must be done programatically (this is an advanced feature).
  2. Tabs: shows a tab with a caption for each layer. Users can click on tab to go to that tab and display the corresponding layer.
  3. Accordian: shows a header with a caption for each layer. Users can click on a header to expand that section and display the corresponding layer.

TabLayers.margin

described in Control

Sets the margin in pixels for your widget. The margin for an object is outside of its border (the padding is inside the border).

Enter a single value like 5 to have a 5 px margin around the widget. To have margins with different widths, enter a comma-separated list of pixel values like this:

margin-top, margin-right, margin-bottom, margin-left

For example, entering

10, 0, 5, 1

Will result in a margin that is 10px wide on top, 0px wide on the right, 5px wide on the bottom and 1px wide on the left.

Use within the javascript editor

this.<WidgetID>.setMargin("5,0,10,15")

TabLayers.multiActive

described in Layers

This property only applies to Accordion layers.

If this property is checked, the user can have multiple open accordion layers at the same time. If it is unchecked (default) only one accordion layer can be open at a time.

TabLayers.name

described in Component

The name is a unique identifier for your widget. Each page element and component must be uniquely identified. WaveMaker automatically renames any non-unique element.

The name makes it easy

  1. Find the component in a bind dialog box
  2. Find the component in your model tree
  3. Reference the component in javascript

Use within the javascript editor

this.<UniqueID>.setShowing(true)

TabLayers.oncanchange

described in Layers

This event is fired when a user has selected another layer (e.g., by pressing a tab or accordion heading) but before leaving the current layer.

// This example disables changing to the layer at index 2; all other layers allow changing.
layerCanchange: function(inSender, inChangeInfo) {
   if (inChangeInfo.newIndex == 2) {
      inChangeInfo.canChange = false;
   } else {
      inChangeInfo.canChange = true;
   }
}

TabLayers.onchange

described in Layers

This event is fired when the user navigates from one layer to another, for example by clicking a tab.

TabLayers.padding

described in Control

Sets the padding in pixels for your widget. The padding for an object is inside of its border (the margin is outside the border).

Enter a single value like 5 to have a 5 px padding around the widget. To have padding with different widths, enter a comma-separated list of pixel values like this:

padding-top, padding-right, padding-bottom, padding-left

For example, entering

10, 0, 5, 1

Will result in padding that is 10px wide on top, 0px wide on the right, 5px wide on the bottom and 1px wide on the left.

Use within the javascript editor

this.<WidgetID>.setPadding("5,0,10,15")

TabLayers.scrollX

described in Control

The ScrollX property enables you to turn on scrollbars for this widget such that more contents than would normally fit into its allocated width can be accessed. Technically, this sets the overflow style to scroll or to none.

Use within the javascript editor

You may want to programatically access this after changing the contents of this widget at runtime.

this.<WidgetID>.setScrollX(true);

TabLayers.scrollY

described in Control

The ScrollY property enables you to turn on scrollbars for this widget such that more contents than would normally fit into its allocated height can be accessed. Technically, this sets the overflow style to scroll or to none.

Use within the javascript editor

You may want to programatically access this after changing the contents of this widget at runtime.

this.<WidgetID>.setScrollY(true);

TabLayers.showing

described in Control

Showing determines whether or not a component is visible. A page element that is not showing has its css display style set to none; it is still a part of the DOM model of the page, but no longer affects the layout of other components.

Uncheck the checkbox to make this widget invisible. A widget that is not showing can still be selected by navigating to that widget in the model tree and clicking it.

Use within the javascript editor

this.<UniqueID>.setShowing(true)

TabLayers.width

described in Control

The width of your widget can be specified in px or % (i.e 50px, 75%).

You can have a row of widgets that combined are more than 100% width; components will be allocated space based on the ratio of sizes (a 80% width widget gets twice as much space as a 40% widget; they will fit in the designated space even though the sum is 120%).

Use within the javascript editor

this.<WidgetID>.setWidth("80px");


      Share/Bookmark
© 2010 WaveMaker Software™ All Rights Reserved.