TsBitBtn problem

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #35501
    Albert
    Participant

    When in-design state TsBitBtn not showing its glyph if its Default property is set to True. If Default = False all Ok. In Run-time if Default = True its glyph also does not show, but when mouse cursor hovers above the button its glyph reappears. D7 & AC v8.10. See attachements.

    #49616
    Support
    Keymaster

    This “OK” icon have an empty alpha-channel and drawn as transparent.

    I can suggest :

    1) to improve an icon (save as 24-bit image) or

    2) use other icon (Png is better) or

    3) set the ac_CheckEmptyAlpha variable to True, this variable is declared in the “sConst” unit.

    #49623
    Albert
    Participant

    I think it would better using TBitBtn (added in the 3rd party list and thus skinned) instead of TsBitBtn. There is some bisbehavior in TsBitBtn component… Let's compare these two controls:

    1) Put them (TBitBtn (skinned) and TsBitBtn on the form

    2) Set their “Kind” property to (for example) bkCancel (or bkOk, it makes no difference as a result)

    3) Set their “Default” property to True

    4) Run the form

    5) See the difference ([attachment=6036:TBitBtn (left) and TsBitBtn (right).png]): TBitBtn, on the left, it looks more correct than TsBitBtn.

    #49625
    Support
    Keymaster

    TsBitBtn paints this “OK” as transparent because the “OK” icon have an empty alpha-channel. TsBitBtn is faster than TBitBtn because have optimization of drawing speed and this button have not a checking of empty alpha-channel. This checking may be enabled by changing of the sConst.ac_CheckEmptyAlpha variable to True.

    BTW. I have opinion that standard icons from Delphi are obsolete, because a lot of new beautyful free icons are available in the Net.

    #49626
    Albert
    Participant

    I have made the recommended change (ac_CheckEmptyAlpha : boolean = True) and rebuilded my project, but all stays the same… I think the main clue to that problem is: the glyph does not show itself only when TsBitBtn.Default = True

    #49627
    Support
    Keymaster

    I will check it at the Monday. I think I will found a good solution for these glyphs.

    You are right, ac_CheckEmptyAlpha does not work with Delphi glyphs when button is default.

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