How to set button background image?

6 posts, 1 answers
  1. Paul
    Paul avatar
    34 posts
    Member since:
    Apr 2017

    Posted 25 Apr 2017 Link to this post

    Hello,

    I tried to create a calculate control as in my attachment

    Each buttons not only have text (1, 2, 3, Enter...etc) but also have background color is kind of gradient so my ideal is use the background image.

    But when I tried to set background image for RadButton then I couldn't.

    Please help to to solve this, or should someone give me any ideals.

    Regard,

    Paul

  2. Paul
    Paul avatar
    34 posts
    Member since:
    Apr 2017

    Posted 26 Apr 2017 in reply to Paul Link to this post

    Hello,

    I just solved this problem so please help me to close this thread

    Thanks you

    Paul

  3. Answer
    Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3462 posts

    Posted 26 Apr 2017 Link to this post

    Hello Paul, 

    Thank you for writing.  

    I am glad that you have resolved the problem you were facing. However, I am posting the reply in the forum in order the community to benefit from it. In regards to the BackgroundImage property, by default, the button has a background color, which is imposed by its FillPrimitive. When you set the BackgroundImage it remains behind the fill, so it is not visible. You can set the ButtonElement.ButtonFillElement.Visibility property to Collapsed. Then, you will be able to see the BackgroundImage and control its image layout with the BackgroundImageLayout property.

    Should you have further questions I would be glad to help.

    Regards,
    Dess
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  4. Paul
    Paul avatar
    34 posts
    Member since:
    Apr 2017

    Posted 26 Apr 2017 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Hello Dess,

    Thanks you for your additional information

    Regard,

    Paul

  5. Ashley
    Ashley avatar
    1 posts
    Member since:
    Aug 2018

    Posted 07 Aug 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Hi Dess

    I am relatively new to coding, as a start.

    I understand what you are doing there, im just not sure how to replicate it in my system. Ive got the 'image' on the page but it seems like its hidden behind something else. how to i set the property of the buttonelement to collapsed? is that handled in a specific bit of code, or in the CSS? 

    This is exactly the fix i need, but not sure how to implement it.

    Thanks for your time

    Ashley

  6. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3462 posts

    Posted 07 Aug 2018 Link to this post

    Hello, Ashley,       

    I have attached a sample project for your reference. However, I would like to note that this forum is related to the Telerik UI for WinForms suite. According to the provided information, I suppose that you are using some of our web products. Feel free to post your technical questions in the relevant forum: https://www.telerik.com/forums Thus, the appropriate community will gladly assist you. Thank you for your understanding.

    Regards,
    Dess
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top