我无法在 Symbian 中重绘我的 CEikRichTextEditor 控件

发布于 2024-12-02 03:31:59 字数 1161 浏览 4 评论 0原文

我使用下面的代码在触摸屏设备上上下拖动 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

攀登最高峰 2024-12-09 03:31:59

尝试使用滚动条框架:

iRichText1->ScrollBarFrame()->DrawScrollBarsNow()

CEikScrollBarFrame,诺基亚SDK

Try using the scrollbar frame:

iRichText1->ScrollBarFrame()->DrawScrollBarsNow()

CEikScrollBarFrame, Nokia SDK

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文