Rominggamer,
I tried your suggestion but it did not work.
I want to have equal distance between the objects in the row so I have:
Flag1 Country 1 Time Country 2 Flag2. The trick here is to keep the Country2 name have the same space from the Flag2 on all rows. Flag1 and Country! they have the same space, but on Country2 I depend on the length of the country2 name to keep it let say 10 pixel from the Flag2, so they look uniform. The way it is in my image they vary.
Here is my onRowRender function:
local function onRowRender( event ) --Set up the localized variables to be passed via the event table --print ("onRowRender") local row = event.row local id = row.index local params = event.row.params local spx=5 row.bg = display.newRect( 0, 0, display.contentWidth, 60 ) row.bg.anchorX = 0 row.bg.anchorY = 0 row.bg:setFillColor( 1, 1, 1 ) row:insert( row.bg ) if ( event.row.params ) then if ( row.isCategory )then --params.title then -- is category row row.title= display.newText( row,params.title, 12, 0, native.systemFontBold, 20 ) row.title.anchorX = 0 row.title.anchorY = 0 row.title:setFillColor( 0 ) row.title.x = 10 row.title.y = row.height / 2 else row.flag = display.newImageRect( row,params.flag,70, 46 ) row.flag.anchorX=0 row.flag.anchorY=0 row.flag.x= 10 row.flag.y = row.height \*0.5-row.flag.height\*0.5 row.countryText = display.newText( row,params.country, 12, 0, native.systemFont, 18 ) row.countryText.anchorX = 0 row.countryText.anchorY = 1.0--0.5 row.countryText:setFillColor( 0.5 ) row.countryText.x = row.flag.x+row.flag.width+spx row.countryText.y = row.height / 2 row.time = display.newText( row,params.time, 12, 0, native.systemFont, 18 ) row.time.anchorX = 0 row.time.anchorY = 1.0--0.5 row.time:setFillColor( 0.5 ) row.time.x = row.countryText.x \*2.5 row.time.y = row.height / 2 row.flag2 = display.newImageRect( row,params.flag2,70, 46 ) row.flag2.anchorX=1 row.flag2.anchorY=0 row.flag2.x= row.countryText.x \*5 row.flag2.y = row.height \*0.5-row.flag.height\*0.5 local ln=string.len( params.country2 )-14 print("len:"..ln) row.countryText2 = display.newText( row,params.country2, 12, 0, native.systemFont, 18 ) row.countryText2.anchorX = 1 row.countryText2.anchorY = 1.0--0.5 row.countryText2:setFillColor( 0.5 ) row.countryText2.x = row.flag2.x- (10\*ln)-150--(string.len( params.country2 )\*10)-8 row.countryText2.y = row.height / 2 row.rightArrow = display.newImageRect(row,myApp.icons, 15 , 40, 40) row.rightArrow.x = display.contentWidth - 20 row.rightArrow.y = row.height / 2 row:insert( row.rightArrow ) row:insert( row.countryText ) row:insert( row.flag ) row:insert( row.countryText2 ) row:insert( row.flag2 ) end end return true end