求助:关于Container中列表重绘问题(CAknColumnListBox)
选择菜单中开始后,视图中列表首先显示"A",过4秒种后同一列表显示“B". 我采用view_container结构。 但是现在程序运行后却看不见A字母,只能看见B字母。我的程序如下:
view中程序如下----------------------------------------------------------
void CMobileTV4View::HandleCommandL(TInt aCommand)
{
Switch(command)
....
....
case EAknMobileTVCmdDownloadingStopContinue: //自定义菜单命令字
{
iContainer->UpdateUI(); //显示A字母的程序
iContainer->DrawNow();
sleep(4);
iContainer->UpdateItem();//显示B字母的程序
}
....
....
}
Container中程序如下------------------------------------------------------
UpdateUI()
{
if (iSavedGamesListBox)
{
CTextListBoxModel* model = iSavedGamesListBox->Model();
if (model->NumberOfItems() > 0)
{
CDesCArray* itemArray = STATIC_CAST(CDesCArray*, model-
>ItemTextArray()); TInt currentItem = iSavedGamesListBox->CurrentItemIndex();
if(currentItem==0)
{
return;
}
currentItem =1;
itemArray->Delete(currentItem); AknListBoxUtils::HandleItemRemovalAndPositionHighlightL(
iSavedGamesListBox,
currentItem,
ETrue);
}
}
if (iSavedGamesListBox)
{
CTextListBoxModel* model = iSavedGamesListBox->Model();
_LIT (KStringAdd, "1\tfirst song Connect...");
TBuf <64> aString;
TInt currentItem = iSavedGamesListBox->CurrentItemIndex();
aString.Format(KStringAdd(), currentItem);
if (model->NumberOfItems() > 0)
{
CDesCArray* itemArray = STATIC_CAST(CDesCArray*, model-
>ItemTextArray());
itemArray->AppendL(aString);
}
iSavedGamesListBox->HandleItemAdditionL();
}
}
UpdateItem()程序和上面的基本一样。
--------------------编程问答-------------------- first song Connect---------------字母A
UpdateItem()--------------------------程序同一位置显示字母B
补充:移动开发 , Symbian