Search code examples
c#winformstelerikradbuttontextbox

radbuttontelerik/winform/c#: how to remove border of the icon?


I have this searcher

enter image description here

I would like to remove the border of the glass.

It is a RadButtonTextBox in Winform in c#.

I thried modifing the colors of textbox and I didn't get what I need:

this.radtxtFilter.RightButtonItems[0].EnableBorderHighlight = false;
this.radtxtFilter.RightButtonItems[0].BorderHighlightColor = System.Drawing.Color.Red;

How can I do it?


Solution

  • Property ShouldPaint is the answer:

    RadButtonElement radButtonElement = new RadButtonElement();
    radButtonElement.ImagePrimitive.Image = Resources.TV_search;
    radButtonElement.BorderElement.ShouldPaint = false;
    this.radtxtFilter.RightButtonItems.Add(radButtonElement);