Text in scrollView goes out of mask when scroll up

Hi, when I tried to scroll up, the content goes out of the mask. Is it a bug or something? Below are my codes

display.setStatusBar( display.HiddenStatusBar )

local widget = require( “widget” )

local scrollView = widget.newScrollView{
top = 100, left = 0,
width = 300, height = 480,
maskFile = “mask.png”,
scrollWidth = 600,
scrollHeight = 1000,

}
local lotsOfText = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur imperdiet consectetur euismod. Phasellus non ipsum vel eros vestibulum consequat. Integer convallis quam id urna tristique eu viverra risus eleifend.\n\nAenean suscipit placerat venenatis. Pellentesque faucibus venenatis eleifend. Nam lorem felis, rhoncus vel rutrum quis, tincidunt in sapien. Proin eu elit tortor. Nam ut mauris pellentesque justo vulputate convallis eu vitae metus. Praesent mauris eros, hendrerit ac convallis vel, cursus quis sem. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque fermentum, dui in vehicula dapibus, lorem nisi placerat turpis, quis gravida elit lectus eget nibh. Mauris molestie auctor facilisis.\n\nCurabitur lorem mi, molestie eget tincidunt quis, blandit a libero. Cras a lorem sed purus gravida rhoncus. Cras vel risus dolor, at accumsan nisi. Morbi sit amet sem purus, ut tempor mauris.\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur imperdiet consectetur euismod. Phasellus non ipsum vel eros vestibulum consequat. Integer convallis quam id urna tristique eu viverra risus eleifend.\n\nAenean suscipit placerat venenatis. Pellentesque faucibus venenatis eleifend. Nam lorem felis, rhoncus vel rutrum quis, tincidunt in sapien. Proin eu elit tortor. Nam ut mauris pellentesque justo vulputate convallis eu vitae metus. Praesent mauris eros, hendrerit ac convallis vel, cursus quis sem. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque fermentum, dui in vehicula dapibus, lorem nisi placerat turpis, quis gravida elit lectus eget nibh. Mauris molestie auctor facilisis.\n\nCurabitur lorem mi, molestie eget tincidunt quis, blandit a libero. Cras a lorem sed purus gravida rhoncus. Cras vel risus dolor, at accumsan nisi. Morbi sit amet sem purus, ut tempor mauris. "

local lotsOfTextObject = display.newText( lotsOfText, 0, 0, 300, 0, “Helvetica”, 14)

lotsOfTextObject:setTextColor(255,123,123)

scrollView:insert(lotsOfTextObject)
[import]uid: 181558 topic_id: 32832 reply_id: 332832[/import]

I’m actually getting a similar result. It clips the bottom correctly, but not at the top when you start scrolling. Here’s my code:

scrollView1 = widget.newScrollView{ left = 100, top = 100, width = 800, height = 600, scrollWidth = 800, scrollHeight = 2000, maskFile="images/mask-800x600.png", listener = scrollViewListener }

So the big question here is whether this is a bug or I just implemented the widget incorrectly. [import]uid: 146178 topic_id: 32832 reply_id: 131609[/import]

I’m actually getting a similar result. It clips the bottom correctly, but not at the top when you start scrolling. Here’s my code:

scrollView1 = widget.newScrollView{ left = 100, top = 100, width = 800, height = 600, scrollWidth = 800, scrollHeight = 2000, maskFile="images/mask-800x600.png", listener = scrollViewListener }

So the big question here is whether this is a bug or I just implemented the widget incorrectly. [import]uid: 146178 topic_id: 32832 reply_id: 131609[/import]

Hi

Please don’t be insulted if this seems obvious but I was having this problem and it took me ages before I finally solved it by re-doing my mask file. I basically have a mask file already made up with 2mm black border round each edge, and I thought I could load this one image each time into photoshop (or whatever you use) and simply rescale it to use with different size table and scroll views. Somehow the outer edge black border got affected in the rescaling and wasn’t masking the view properly.

Just in case you use a similar method to me, it’s worth a try to rule it out. make sure the mask file definitely has the 2mm minimum black border round each edge once you have set the size.

I was using a scroll view within a table view and each row had scrolling content. The content would mask below but overlap scrolling up. I solved it by doing the above so it could be the mask you’re using.

Hope this helps(?) Good luck [import]uid: 131622 topic_id: 32832 reply_id: 133108[/import]

Hi, thanks!! It is working now [import]uid: 181558 topic_id: 32832 reply_id: 133163[/import]

Hi

Please don’t be insulted if this seems obvious but I was having this problem and it took me ages before I finally solved it by re-doing my mask file. I basically have a mask file already made up with 2mm black border round each edge, and I thought I could load this one image each time into photoshop (or whatever you use) and simply rescale it to use with different size table and scroll views. Somehow the outer edge black border got affected in the rescaling and wasn’t masking the view properly.

Just in case you use a similar method to me, it’s worth a try to rule it out. make sure the mask file definitely has the 2mm minimum black border round each edge once you have set the size.

I was using a scroll view within a table view and each row had scrolling content. The content would mask below but overlap scrolling up. I solved it by doing the above so it could be the mask you’re using.

Hope this helps(?) Good luck [import]uid: 131622 topic_id: 32832 reply_id: 133108[/import]

Hi, thanks!! It is working now [import]uid: 181558 topic_id: 32832 reply_id: 133163[/import]