This is a migrated thread and some comments may be shown as answers.

Adding icon to radtextbox

2 Answers 435 Views
Input
This is a migrated thread and some comments may be shown as answers.
Katya
Top achievements
Rank 1
Katya asked on 03 Jul 2013, 02:52 AM
Hi

How can I add a icon to the right most position in a Radtextbox?

Thanks for replying
Katya

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 03 Jul 2013, 05:45 AM
Hi

As far as I know the RadTextbox does not provide a predefined property to add images or icons. Still with the help of CSS you can achieve your requirement. Please have a look at the following code I tried which works fine at my end.

ASPX:
<telerik:RadTextBox ID="RadTextBox1" runat="server">
</telerik:RadTextBox>
<asp:Image ID="aspimage1" runat="server" ImageAlign="AbsMiddle" CssClass="styleIcon"
    ImageUrl="~/Images/del.jpg" />

CSS:
<style type="text/css">
    .styleIcon
    {
        margin-left: -23px;
    }
    .riTextBox[type="text"]
    {
        padding-right: 21px !important;
    }
</style>

Thanks,
Shinu.
0
Gabriel
Top achievements
Rank 2
answered on 30 Jul 2013, 09:45 PM
it worked perfect for me.

One thing to fix.

you added the cssClass styleIcon to the image and in the css says textboxstyle instead

Besides that, works fine :)
Tags
Input
Asked by
Katya
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Gabriel
Top achievements
Rank 2
Share this question
or