I'm using the following RadButton definition, but not getting any images displayed on my page...
I've checked the paths to my images using Firebug and it's picking them up ok. Have I defined the button incorrectly?
6 Answers, 1 is accepted
I have made some modifications in your code. I was able to set the image by setting height and width for the button. Here is the sample code.
Odd... doesn't work.
The images exist.. but don't appear.
<telerik:RadButton ID="RB_CopyCC" runat="server" TabIndex="1" ButtonType="ToggleButton" ToggleType="CustomToggle" UseSubmitBehavior="false" AutoPostBack="false" ToolTip="Check to copy the division" Width="20px" Height="20px">
<telerik:RadButtonToggleState ImageUrl="../Images/left.png" />
<telerik:RadButtonToggleState ImageUrl="../Images/right.png" />
I can't get the images to render but I can see that the url to the image appears in the "View Source" of the document... if I use a simple img tag, it appears.
Two different developers having the same problem... I'm guessing that since the OP didn't reply, didn't work for him either.
Can you post a picture of the test being successful?
I am attaching below a small sample that works for me. If comparing it against your project does not help, can you show me how to modify it so it showcase the problem, and also provide the Telerik controls version the project uses? I'm also attaching a short video of how this works as expected for me.
The original post is from 2012 and Shinu's post was marked as an answer by OP (there is a grey background on the post and an "ANSWER" banner above the avatar), which indicates this worked for them.
Thank you for the video. I'm using Q2 of 2015. I found that I had to set the image to be the exact height and width specified in the control. I assumed it would scale it down, like the IMG tag...ugh, what a waste of time trying to figure out something that isn't native like other elements and controls are...
In the future when having similar issues, you can inspect the rendered HTML and its CSS rules through the browser dev toolbar to see what is going on so you can have a stronger pointer for troubleshooting. The following blog post can help people gets started with this: https://www.telerik.com/blogs/improve-your-debugging-skills-with-chrome-devtools.
Also, the newer RadToggleButton provides a property for controlling the size of the image: https://docs.telerik.com/devtools/aspnet-ajax/controls/togglebutton/functionality/image. I am attaching a sample that shows how this works and how a little bit of CSS can have the old button behave the same way in case upgrading to get the new buttons is not an option.