WEB开发网
开发学院手机开发Symbian 开发 关于在symbian listbox中添加svg图片的问题 阅读

关于在symbian listbox中添加svg图片的问题

 2010-05-31 20:19:00 来源:WEB开发网   
核心提示:*/TKeyResponse CATestList2ListBox::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType ){// [[[ begin generated region: do not modify [Generated Contents

*/

TKeyResponse CATestList2ListBox::OfferKeyEventL(

const TKeyEvent& aKeyEvent,

TEventCode aType )

{

// [[[ begin generated region: do not modify [Generated Contents]

if ( aKeyEvent.iCode == EKeyLeftArrow

|| aKeyEvent.iCode == EKeyRightArrow )

{

// Listbox takes all events even if it doesn't use them

return EKeyWasNotConsumed;

}

// ]]] end generated region [Generated Contents]

if ( iFocusControl != NULL

&& iFocusControl->OfferKeyEventL( aKeyEvent, aType ) == EKeyWasConsumed )

{

return EKeyWasConsumed;

}

return CCoeControl::OfferKeyEventL( aKeyEvent, aType );

}

// [[[ begin generated function: do not modify

/**

* Initialize each control upon creation.

*/

void CATestList2ListBox::InitializeControlsL()//这个就是初始化控件的方法

{

iListBox = new ( ELeave ) CAknDoubleLargeStyleListBox;//初始化listBox

iListBox->SetContainerWindowL( *this );//设置list的

{

TResourceReader reader;//一个资源解析器

iEikonEnv->CreateResourceReaderLC( reader, R_ATEST_LIST2_LIST_BOX_LIST_BOX );//读取资源

iListBox->ConstructFromResourceL( reader );//构造资源

CleanupStack::PopAndDestroy(); // reader internal state

}

// the listbox owns the items in the list and will free them

iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray );//这个是说list拥有item并且负责处理他们

// setup the icon array so graphics-style boxes work//设置list的图标

SetupListBoxIconsL();

// add list items

AddListBoxResourceArrayItemL( R_ATEST_LIST2_LIST_BOX_LISTBOX_ITEM1,

EListBoxAtestlist2List_iconIndex );

AddListBoxResourceArrayItemL( R_ATEST_LIST2_LIST_BOX_LISTBOX_ITEM2,

上一页  23 24 25 26 27 28 29 30 31  下一页

Tags:关于 symbian listbox

编辑录入:coldstar [复制链接] [打 印]
赞助商链接