关于在symbian listbox中添加svg图片的问题
2010-05-31 20:19:00 来源:WEB开发网}
// [[[ begin generated function: do not modify
/**
* Layout components as specified in the UI Designer
*/
void CATestList2ListBox::LayoutControls()
{
iListBox->SetExtent( TPoint( 0, 0 ), iListBox->MinimumSize() );
}
// ]]] end generated function
/**
* Handle key events.
*/
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
更多精彩
赞助商链接