Bug Report B20170
Visible to All Users

Button glyphs are painted incorrectly

created 18 years ago

After upgrade to version 28 the TcxButton does not paint the glyph correctly when the glyph is loaded at run-time.
The following worked correctly before version 28:
ImageList.GetBitmap(IMAGE_MODEL_RUN, btnRun.Glyph);
If the glyph is pre-loaded at design-time it works fine.
Steps to Reproduce:
Add TcxButton to form. Do NOT assign glyph at design-time. Add code to load glyph in form's FormCreate event.

Show previous comments (1)
Serge (DevExpress Support) 18 years ago

    Dear Scot,
    We are a bit overloaded with support queries after releasing the new build 28. Thus, there may be some delays in answering your requests. We do our best to process them in a timely manner. Please bear with us.
    Thanks,
    Serge

    DevExpress Support Team 18 years ago

      Hi Scot,
      After implementing Suggestion ID: CS18368, TcxButton - Add support for 32-bit bitmaps with alpha channel, button glyphs loaded from an image list should contain correct alpha channel information. To get proper images from image lists, call the TcxImageList.GetImage method instead of the ImageList.GetBitmap method. Said differently, please modify the code as follows:

      Delphi
      ImageList.GetImage(IMAGE_MODEL_RUN, btnRun.Glyph);

      Please try this solution and let us know your results.
      Thanks,
      Alex

      DevExpress Support Team 18 years ago

        Alternatively, you can call the TcxImageList.GetImageInfo class function (in case ImageList is not a TcxImageList descendant) as shown in the following code snippet:

        Delphi
        TcxImageList.GetImageInfo(ImageList.Handle, IMAGE_MODEL_RUN, btnRun.Glyph, nil);

        Thanks,
        Alex

        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.