Hi all. I have a long “newtext” to insert in a new scene of a WebApp I am creating.
How to add a scrolliew in the Content text?
Thank in advance for the help.
Alex
The code of create scene is the following
function scene:create( event )
local sceneGroup = self.view
-- Called when the scene's view does not exist.
--
-- INSERT code here to initialize the scene
-- e.g. add display objects to 'sceneGroup', add touch listeners, etc.
-- create a white background to fill screen
local bg = display.newRect( 0, 0, display.contentWidth, display.contentHeight )
bg.anchorX = 0
bg.anchorY = 0
bg:setFillColor( 1 ) -- white
-- create some text
local title = display.newText( "Second View", 0, 0, native.systemFont, 32 )
title:setFillColor( 0 ) -- black
title.x = display.contentWidth * 0.5
title.y = 125
local newTextParams = { text = "Loaded by the second tab's\n\"onPress\" listener\nspecified in the 'tabButtons' table",
x = 0, y = 0,
width = 310, height = 310,
font = native.systemFont, fontSize = 14,
align = "center" }
local summary = display.newText( newTextParams )
summary:setFillColor( 0 ) -- black
summary.x = display.contentWidth * 0.5 + 10
summary.y = title.y + 215
-- all objects must be added to group (e.g. self.view)
sceneGroup:insert( bg )
sceneGroup:insert( title )
sceneGroup:insert( summary )
end