TsSpeedButton Reflected not working in runtime mode

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #34333
    Aljosa
    Participant

    Hello,

    I have a problem using TsSpeedButton.Reflected property. I am using Delphi 2010. If I add TSSpeedButton with Reflected property set to True on form and select png bitmap file for a Glyph property I can see reflected icon on my button. But when I add TsSpeedButton programaticaly in code and set Reflected to true and load bitmap from resource there is no reflection on button.

    Code:
    1. case
    – Add TsSpeedButton to form
    – Set reflected property to true
    – load png in Glyph property
    ————————————
    Everything looks ok. Reflection is present on button.

    2. case
    – create button with Btn := TSSpeedButton.Create
    – set reflected property to true: Btn.Reflected := true;
    – create bitmap: BMP := TBitmap.Create
    – load image from resource: BMP.LoadFromResourceName(hinstance, 'BUTTON')
    – assign BMP to button's glyph property: Btn.Glyph.Assign(BMP)
    ————————————
    Image is present on button but there is no reflection effect on it.

    Can you help me to find workaround please?

    Best regards and thank you.

    #44772
    Support
    Keymaster

    Hello

    Difference is in glyph format – bitmaps haven't support of reflections if pixel format is not pf32bit.

    So, you must use 32-bit bitnaps or Png glyphs.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.