Bug Report T134287
Visible to All Users

Layout View - Data item captions are painted twice

created 11 years ago

I have discovered a new problem with LayoutView. I am utilizing the OnCustomDrawCell event of TcxGridLayoutViewItem to customize the look of the caption (as suggested in issue T106647). In the new 2014 vol 1.2 version the caption became "distorted", as it seems to me the caption text is drawn twice. I have prepared a small sample project to demonstrate the issue. The item2 item should not be visible at all but the caption text is still visible. The item1's caption text is "thicker" as transparent text with clear-type is drawn twice on the same area. The item3 clearly displays the problem when an italic font style is used. It is probably painted before the OnCustomDrawCell event, because if I fill the area with a custom background, it looks fine (as can be seen on item4).

Regards, Jaroslav.

Answers approved by DevExpress Support

created 11 years ago

We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

    created 11 years ago

    Hello Jaroslav,

    From what I can see, the code provided in the How to change default row captions's color of the grid layout view ? ticket (the ticket which Mikhail is referring to in his comment in the TcxGridLayoutView - possibility to set LayoutItem header style ticket) contains the
    ACanvas.FillRect(AItem.Bounds, clRed);

    string, which draws the background in a way to erase a previously drawn content. I believe that erasing the background is the most reliable way to perform custom drawing in this scenario.

      Comments (2)
      JN JN
      Jaroslav Nechyba 11 years ago

        Hello Paulo,
        Thank you, but I know, I can overcome this by erasing the background. The issue is perceivable with normal LayoutView (without owner draw) as well. It has "thicker" descriptions (item1 in my sample - the caption text should normally look like item3).
        Additionally, if I do not want do paint the background with a special color, I need to determine the default one. Everything worked fine in 2013 vol2.6, so I still think this is a regression. Can it be fixed?
        Regards, Jaroslav.

        DevExpress Support Team 11 years ago

          Hello,

          I have forwarded this ticket to our developers. We will check whether or not it is possible to change this behavior.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.