I have a weird problem, basically I have a number of white rectangular images arranged into a table, with text objects on top.
I then use setFillColor on these images to make each row a certain colour, this will be dynamic depending on what data is on that row.
That works fine if the images are just inserted into a normal display group, but when I insert them into a newScrollView, the first image object seems to inherit the alpha property of the ScrollView background, while the rest lose their setFillColor property and revert to white.
[lua]–create scrollGroup
scrollView = widget.newScrollView{
width = 480,height = hu, scrollWidth = 480, scrollHeight = 300,bgColor = {0,0,0,50}, maskFile=ms, listener = scrollViewListener}
–create images (extract)
local rd = math.random(100,255)
local gn = math.random(100,255)
local bl = math.random(100,255)
for b = 1, 9, 1 do
local i = display.newImageRect(“league_”…im[b]…".png", xs[b], 22)
i.x = xp[b] ; i.y = (a* 22); i.alpha = 1
i:setFillColor(rd,gn,bl) – random colours for now
tableGroup:insert(i)
content[no] = i
end
scrollView:insert(tableGroup) – same happens if objects added individually[/lua]
This is what the objects look like when not inserted in the scrollView:
When inserted in the scrollView:
[import]uid: 93133 topic_id: 33930 reply_id: 333930[/import]