Zebra API Doc

zebra.layout.ListLayout Class

List layout places components vertically one by one

   // create panel and set list layout for it
   var p = new zebra.ui.Panel();
   p.setLayout(new zebra.layout.ListLayout());

   // add three buttons into the panel with list layout 
   p.add(new zebra.ui.Button("Item 1"));
   p.add(new zebra.ui.Button("Item 2"));
   p.add(new zebra.ui.Button("Item 3"));

Constructor

zebra.layout.ListLayout

(
  • [ax]
  • [gap]
)

Parameters:

  • [ax] Integer | String optional

    horizontal list item alignment:

    zebra.layout.LEFT - left alignment 
    zebra.layout.RIGHT - right alignment 
    zebra.layout.CENTER - center alignment 
    zebra.layout.STRETCH - stretching item to occupy the whole horizontal space
    
    or
    
    "left"
    "right"
    "center"
    "stretch"
  • [gap] Integer optional

    a space in pixels between laid out components

Item Index

Attributes

Attributes

ax

Integer readonly

Horizontal list items alignment

gap

Integer readonly

Pixel gap between list items