Button borders blend issue

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34472
    Aljosa
    Participant

    Hello,

    I am combining Alphacontrols with some custom graphics which is loaded in TImage and put behind buttons. TImage can't contain controls so button's parent is actually main form. TImage is positioned behind button (actually between form and button).

    I am noticing some button graphics blend issues in that case. Button has troubles to blend borders with TImage which is behind button. I assume button is blending with it's parent which is form not TImage.

    Please look at attached image. There are 3 different cases (with skin BlueGlass).

    1. The most top section of form : Alpha controls – TsPanel, TsButton, TsBitButton … blend ok (with TsPanel)

    2. The middle section of form : Standard delphi TPanel and Alpha controls tsButton, tsbitbutton …. blend ok (with TPanel)

    3. The bottom section of form : standard delphi TImage and Alpha controls …. blend not ok (see green arrow).

    I guess in 3 case button tries to blend with it's parent – form. So the borders around buttons are blended regarding form not regarding TImage behind.

    Is there any workaround how to solve this to blend buttons property. I attached image and source code of example.

    Thanks and best regards.

    Aljosa

    #45361
    Support
    Keymaster

    Hello and thank you for the demo.

    It is a known issue, button receives an information for transparency from his parent (form) and ignores TImage.

    I'll try to solve it later. You can draw Image on form in OnPaint property, it's a quick solution.

    #45364
    Aljosa
    Participant
    'Support' wrote:

    Hello and thank you for the demo.

    It is a known issue, button receives an information for transparency from his parent (form) and ignores TImage.

    I'll try to solve it later. You can draw Image on form in OnPaint property, it's a quick solution.

    Hi,

    However it is not such a big problem and can be solved with OnPaint event like you said. Just to notify you.

    With on paint event works great for me.

    Thanks for your great support. 😉

    Br,

    Aljosa

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