We can use the MTList's scrolling ability to to create a scrollable textarea. For this purpose we create a MTList with only one MTListCell which will contain our MTTextArea.
The list cell should have the same dimensions as the text area and the same width as the list.

         MTList aList = new MTList(100, 50, 200, 400, mtApplication);
                MTListCell listCell = new MTListCell(200, 600, mtApplication);
                MTTextArea texta = new MTTextArea(0,0, 200,600, mtApplication);
                texta.setText("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,\n no sea takimata sanctus est Lorem ipsum dolor sit amet. \nDuis autem ve Lorem ipsum dolor sit amet. adiĆ³s!");
                listCell.addChild(texta);
                aList.addListElement(listCell);
                getCanvas().addChild(aList);
Powered by MediaWiki contact