Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BorderLayout is not displaying through m.ScrollContainer

Hi,

I am trying to display the information inside sap.m.ScrollContainer object. Used sap.ui.commons.layout.BorderLayout to maintained the information. But the contents are not displaying in output.

What could be the reason?

If i pass simple textarea / text / lable inside ScrollContainer, it's displaying fine, but for BorderLayout  it's not working.

I have also trying with Panel, it's displaying in output, but in very small place, even i have given height and width as "100%".

code:

var page = new sap.m.Page({

  title: "Title",});

  var mPanel = new sap.m.Panel({

  width : "100%",

  });

  var panel = new sap.ui.commons.Panel({

  Collapsed : false,

  showCollapseIcon : false,

  enabled : false,

  areaDesign : sap.ui.commons.enums.AreaDesign.Transparent,

  //borderDesign : sap.ui.commons.enums.BorderDesign.None,

  });

  var area = new sap.ui.commons.layout.BorderLayout({height: "100px",width : "100%"});

  var text1 = new sap.m.TextArea(

  {

  enabled : true,

  editable : false,

  height   : "100%",

  });

  text1.setValue("Information");

  var text2 = new sap.m.TextArea(

  {

  enabled : true,

  editable : false,

  height   : "100%",

  });

  text2.setValue("Information");

  area.setEnd(new sap.ui.commons.layout.BorderLayoutArea(

  {

  //size : "100%",

  contentAlign :   "right",

  content : text1

  }));

  panel.addContent(area);

  var scroll = new sap.m.ScrollContainer({

  width : '100%',

  height : '100%',

  });

  scroll.addContent(area);

  page.addContent(scroll);

  return page;

  }

Thanks

Praveer.

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question