我无法在 Symbian 中重绘我的 CEikRichTextEditor 控件
我使用下面的代码在触摸屏设备上上下拖动 CEikRichTextEditor 内容(滚动),但问题是当我拖动滚动条本身(向上或向下),然后再次开始拖动(在控件内)时,滚动条仍在原位,没有更新:
void CAIBookDescribtion::HandlePointerEventL(const TPointerEvent& aPointerEvent)
{
static TInt firstpoint;
if(aPointerEvent.iType == TPointerEvent::EButton1Down)
{
firstpoint = aPointerEvent.iPosition.iY;
}
if(aPointerEvent.iType == TPointerEvent::EDrag)
{
if(aPointerEvent.iPosition.iY > firstpoint)
{
iRichText1->TextView()->ScrollDisplayL(TCursorPosition::EFLineUp);
iRichText1->UpdateScrollBarsL();
DrawNow();
iRichText1->DrawNow();
}
else
{
iRichText1->TextView()->ScrollDisplayL(TCursorPosition::EFLineDown);
iRichText1->UpdateScrollBarsL();
DrawNow();
iRichText1->DrawNow();
}
}
}
那么如何刷新(重绘)控件及其滚动条以反映其内容?
我正在使用 Symbian C++、S60 5th Ed SDK、Carbide.C++ 2.7,在诺基亚 E7 (Symbian Anna) 上进行测试
我使用 Carbide.C++ 2.7 UI 控件创建了 CEikRichTextEditor 控件。
此致。
I'm using code below to drag CEikRichTextEditor contents up and down (Scroll) on touch screen devices but the problem is that when I drag the scroll-bar itself (up or down), and then start dragging again (inside the control), the scroll-bar still in its place with no update:
void CAIBookDescribtion::HandlePointerEventL(const TPointerEvent& aPointerEvent)
{
static TInt firstpoint;
if(aPointerEvent.iType == TPointerEvent::EButton1Down)
{
firstpoint = aPointerEvent.iPosition.iY;
}
if(aPointerEvent.iType == TPointerEvent::EDrag)
{
if(aPointerEvent.iPosition.iY > firstpoint)
{
iRichText1->TextView()->ScrollDisplayL(TCursorPosition::EFLineUp);
iRichText1->UpdateScrollBarsL();
DrawNow();
iRichText1->DrawNow();
}
else
{
iRichText1->TextView()->ScrollDisplayL(TCursorPosition::EFLineDown);
iRichText1->UpdateScrollBarsL();
DrawNow();
iRichText1->DrawNow();
}
}
}
So how can I refresh (Redraw) the control and its scroll-bar to reflect its contents?
I'm using Symbian C++, S60 5th Ed SDK, Carbide.C++ 2.7, Testing on Nokia E7 (Symbian Anna)
I created the CEikRichTextEditor control using Carbide.C++ 2.7 UI controls.
Best Regards.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用滚动条框架:
iRichText1->ScrollBarFrame()->DrawScrollBarsNow()
CEikScrollBarFrame,诺基亚SDK
Try using the scrollbar frame:
iRichText1->ScrollBarFrame()->DrawScrollBarsNow()
CEikScrollBarFrame, Nokia SDK