1.无论你有没有有创建滚动条,滚动条都占者一块地方。解决办法:设置list的left属性,也就是让list向左移移。
2.先看一段代码:
"<div id='item' style='width:100%; height:40;'>"
"<div id='label' style ='width:70%;height:100%;padding:auto auto auto 10;'></div>"
"<input id='checkbox' type='checkbox' value='0' style='left:90%;display:none;'>"
"</div>"
使用上面的代码创建list,checkbox会填埋整个屏幕,而不是你通过iList->SetProperty(KHStrListItemCount, aCount);设置的数量,如图:
也因此,在退出程序的时候,有内存泄露(checkbox未完全析构掉)。
解决办法:
checkbox放在 RenderListItemL(CHtmlElement* aElement, TInt aIndex)中创建,
_LIT(KCheckHtml, "<input id='checkbox' type='checkbox' value='0' style='left:85%; padding:auto auto;'>");
iControl->InsertContentL(aElement->Element(_L("label")), EAfterEnd, KCheckHtml);
这样就没问题了。