This is very odd. When in a tableView, it does not.
local widget = require( "widget" ) local screenLeft = display.screenOriginX local screenWidth = display.contentWidth - screenLeft \* 2 local screenTop = display.screenOriginY local screenHeight = display.contentHeight - screenTop \* 2 local screenTopSB = display.screenOriginY + display.topStatusBarContentHeight local screenHeightSB = display.contentHeight - screenTopSB local group = display.newGroup() --local background = display.newImageRect( group, "bg.jpg", screenWidth, screenHeightSB ) --background.x = screenWidth/2 --background.y = screenHeightSB/2+display.topStatusBarContentHeight local topRect = display.newRect( group, screenWidth/2, screenTopSB, screenWidth, 300 ) topRect:setFillColor(0.5,1,0) local textToAdd = "Testing time - "..os.time(os.date("!\*t")).." --------- ----------- ----------- ---------- -------" local tableView = widget.newTableView({ left = screenLeft, top = screenTopSB+200, width = screenWidth, height = screenHeightSB-200, hideBackground = true, noLines = true, topPadding = 30, bottomPadding = 30, isBounceEnabled = false, hideScrollBar = true }) function testCase1NoCustomRender() local msgText = "[start]"..textToAdd..textToAdd..textToAdd local newTextObj = display.newText({ text = msgText, width = screenWidth }) local msgHeight = newTextObj.height print("Msg Height calculated to be:"..msgHeight.." width:"..screenWidth) tableView:insertRow(newTextObj) end function testCase2CustomRender() local tableView2 = widget.newTableView({ left = screenLeft, top = screenTopSB+200, width = screenWidth, height = screenHeightSB-200, hideBackground = true, noLines = true, topPadding = 30, bottomPadding = 30, isBounceEnabled = false, hideScrollBar = true, onRowRender = function( event ) -- Get reference to the row group local row = event.row local rowParent = event.row local rowWidth = row.contentWidth local rowHeight = row.contentHeight print("rowWidth:"..rowWidth) print("rowHeight:"..rowHeight) local containerPanel = display.newRect(rowParent, rowWidth/2, rowHeight/2, screenWidth, rowHeight) containerPanel:setFillColor(1) print("render row:"..row.params.message) local rowTitle = display.newText({ parent = rowParent, text = row.params.message, x = 15, y = 45/2 }) rowTitle:setFillColor( 0 ) rowTitle.anchorX = 0 end }) local msgText = "[start]"..textToAdd..textToAdd..textToAdd print("msg:"..msgText) local group = display.newGroup() local tmp = display.newText({ parent = group, text = msgText, width = 400 }) local msgHeight = tmp.height print("Msg Height calculated to be:"..msgHeight.." width:"..screenWidth) group:removeSelf() group = nil tableView2:insertRow{ isCategory = false, rowHeight = msgHeight, rowColor = { default = { 255, 255, 255, 0 } }, params = { message = msgText } } end --testCase1NoCustomRender() testCase2CustomRender()