Print Page | Close Window

[solved] Clipped text in TaskDialog

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=23133
Printed Date: 23 December 2024 at 3:13pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [solved] Clipped text in TaskDialog
Posted By: MacW
Subject: [solved] Clipped text in TaskDialog
Date Posted: 15 September 2016 at 5:08am
Hi,

I use the latest XTP.

When I use a CXTPTaskDialog with a verify  (SetVerificationText) the text is clipped when the dialog is configured to use markup via EnableMarkup.

The problem is independent from whether or not I wrap the verify text in a <TextBlock> or not. What helps is to add a few extra blanks to the end, so this seems to be one of the wrong width calculations again.

Text should read: "Apply to all"






Replies:
Posted By: olebed
Date Posted: 15 September 2016 at 12:34pm
Hello,

It is very very similar to http://forum.codejock.com/forum_posts.asp?TID=22832" rel="nofollow - this issue . I suppose you forgot make changes in code.
Originally posted by MacW MacW wrote:

I've made the patch, re-compiled XTP and the problem is gone.


We expect version 17.3 with this fix in September.

Regards,
 Oleksandr Lebed


Posted By: MacW
Date Posted: 18 September 2016 at 6:56am
No, this patch (remove ceil) is already applied. It still clips the verify string. This is how the method looks in my patched code:

SIZE CXTPMarkupGdiPlusDeviceContext::MeasureString(LPCWSTR lpszText, int nCount) const
{
    SIZE sz = { 0 };

    RectF rc;
    RectF layoutRect(0, 0, 0.0f, 0.0f);

    if (Gdiplus::Ok == m_pGdiPlus->GdipMeasureString(GetGraphics(),
        lpszText, nCount, AccessFont(), &layoutRect,
        m_pGpStringFormat, &rc, 0, 0))
    {

        sz.cx = static_cast<int>(rc.Width);
        sz.cy = static_cast<int>(rc.Height);
    }

    return sz;
}



Posted By: MacW
Date Posted: 12 December 2016 at 12:35pm
This problem seems to be fixed in the 17.3.
I don't could check all potential problem Task Dialogs yet, but so far things look shiny. Thanks!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net