Mobile Development 10.11 | webMethods Mobile SuiteWeb Help | webMethods Mobile Designer Native User Interface Reference | Native User Interface (NativeUI) Objects | nUIContainerElement
 
nUIContainerElement
com.softwareag.mobile.runtime.nui.nUIContainerElement
Use to display a container that holds other NativeUI objects.
You can set the container’s attributes to allow scrolling. For example, the application might use the container to hold long pieces of text that exceeds the viewable area, allowing the user to scroll through the text.
Usage Notes
*Set the Height attribute to set height of the object. By default, the nUIContainerElement object occupies the remaining width of the parent object. However, you can adjust the width of the nUIContainerElement object using the Width attribute.
*If you want to use a scrolling nUIContainerElement object in a view, ensure that the parent nUIViewDisplay object does not allow scrolling.
CAUTION:
Setting the Hscrollable attribute to true to allow horizontal scrolling currently results in undefined behavior.
*The following are platform-specific considerations:
Android
The InnerX and InnerY default values are 0 (zero).
iOS
The InnerX and InnerY default values are 0 (zero).
Example
This code sample displays the nUIContainerElement object between two nUIButtonElement objects. Details on how the example code is rendered on various platforms follow the code sample.
//Add buttons to help demonstrate the bounds of the container.
view.add(new nUIButtonElement(-1, "nUIButtonElement 1"));
 
nUIContainerElement my_container = new nUIContainerElement(-1);
my_container.setHeight(150);
my_container.add(new nUITextfieldElement(-1, LOREM_IPSUM_STRING));
view.add(my_container);
 
view.add(new nUIButtonElement(-1, "nUIButtonElement 2"));
Platform
Platform-Specific Class and Visual Reference
Android
android.widget.ScrollView with RelativeLayout.LayoutParams
iOS
UIView with a UIScrollView