TsButton.ElevationRequired doesn't work

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #37663
    Siegbert
    Participant

    Hello,

    on a standard TButton it is possible to show the security-shield for UAC by setting ElevationRequired to true. This doesn't work on a TsButton in AlphaControls Version 11.

    So I have tried to use a standard TButton. This button shows the UAC-shield at desingtime when ElevationRequired is set, but on runtime the button shows the design from the selected skin an no shield-icon.

    Is this a bug or is it neccassary to add some other proprties to the button to show the UAC-icon if ElevationRequired is true?

    regards

    Siegbert

    #57295
    Support
    Keymaster

    Hello

    This glyph is painted by Windows system if all control is rendered by the system.

    OS can't paint this glyph over the skin, so, this glyph should be painted additionally by the skin-engine.

    I'm thinking, how to do it better, this feature may be extended. Maybe, you have suggestions for this property.

    I have attached the image of button with my variant of this glyph output.

    #57309
    Siegbert
    Participant

    My workaround is to add a TsAlphaImageList with the Icon, add this to the image-property of the button and set image-Index to -1 to disable the icon and to 0 to enable it.

    The way according to MS standard will be to get the icon via LoadIcon-Function with IDI_SHIELD as lpIconName if property ElevationRequired is true and paint it with the skin. Normaly the icon will be aligned left on the button. The Icon looks s little different in Vista, Win7, Win8-10. I think LoadIcon will always use the icon for the intalled OS.

    If ther will be a way to select alignt left, right, top, bottom like aligning the image from an inmaglist you can design the button as you need it.

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