내 코로나 프로젝트에서 테이블 행에 텍스트 필드를 표시하고 싶습니다. 여기 코드에 하나의 텍스트 필드 만 표시됩니다. 데이터 필드에 텍스트 필드를 표시하고 싶습니다.테이블 행에 텍스트 필드 추가 - 코로나 SDK
는local function onRowRender(event)
local phase = event.phase
local row = event.row
local itemObj = GetItemDetails(row.index);
local txt = itemObj.itemName;
if(#txt > 25) then
txt = string.sub(txt,1,25);
txt = txt.."..";
end
local rowTitle = display.newText(row, "\t"..txt, 0, 0, "impact", 14)
if(deviceName == "iPhone" or deviceName == "iPad") then
rowTitle.x = row.x - (row.contentWidth * 0.5) + (rowTitle.contentWidth * 0.5)
else
rowTitle.x = row.x - (row.contentWidth * 0.5) + (rowTitle.contentWidth * 0.5)+15
end
rowTitle.y = row.contentHeight * 0.5
rowTitle:setTextColor(98, 71, 24)
local rowqtytxt=nil;
if(deviceName == "iPhone" or deviceName == "iPad") then
rowqtytxt= native.newTextField(0, 0,32, 32 ,onSubmitted);
rowqtytxt.x = 125;
rowqtytxt.hasBackground = false;
--rowqtytxt:addEventListener("userInput", textListener)
rowqtytxt.size = 32;
else
rowqtytxt = native.newTextField(0, 0,32, 32 ,onSubmitted);
rowqtytxt.x = 207;
rowqtytxt.hasBackground = false;
-- rowqtytxt:addEventListener("userInput", textListener)
rowqtytxt.size = 32;
end
rowqtytxt.y = row.contentHeight * 0.5
rowqtytxt:setTextColor(98, 71, 24)
return true;
end
위의 코드는 당신이 무엇을 의미합니까, '자료 없음 행'말할 때이 문제