WEB开发网
开发学院手机开发Symbian 开发 Symbian S60 3rd 滚动条控件模块 阅读

Symbian S60 3rd 滚动条控件模块

 2010-04-20 15:54:00 来源:WEB开发网   
核心提示:NeedUpdate = EFalse;}if (0 > aRangeVScroll){aRangeVScroll = 0;}iPosVScroll = aPosVScroll;iRangeVScroll = aRangeVScroll;UpdateScroolBarPosition(iPosVScroll,iR

NeedUpdate = EFalse;

}

if (0 > aRangeVScroll)

{

aRangeVScroll = 0;

}

iPosVScroll = aPosVScroll;

iRangeVScroll = aRangeVScroll;

UpdateScroolBarPosition(iPosVScroll,iRangeVScroll);

return NeedUpdate;

}

TAny CMyEikVScrollBarFrame::GetPosAndRange(TInt* aPosVScroll,TInt* aRangeVScroll)

{

if (aPosVScroll)

{

*aPosVScroll = iPosVScroll;

}

if (aRangeVScroll)

{

*aRangeVScroll = iRangeVScroll;

}

}

TKeyResponse CMyEikVScrollBarFrame::OfferKeyEventL(

const TKeyEvent& aKeyEvent, TEventCode aType)

{

TInt pos,range;

if (aType == EEventKey)

{

switch (aKeyEvent.iCode)

{

case EKeyUpArrow:

{

GetPosAndRange(&pos,&range);

if (SetPosAndRange(pos-1,range))

{

iObserver.HandleVScrollBarEvent(pos-1,range);

}

}break;

case EKeyDownArrow:

{

GetPosAndRange(&pos,&range);

if (SetPosAndRange(pos+1,range))

{

iObserver.HandleVScrollBarEvent(pos+1,range);

}

}break;

}

}

return EKeyWasConsumed;

}

上一页  1 2 3 4 

Tags:Symbian rd 滚动

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