Reputation: 7359
I have this searcher
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?
Upvotes: 0
Views: 144
Reputation: 7359
Property ShouldPaint is the answer:
RadButtonElement radButtonElement = new RadButtonElement();
radButtonElement.ImagePrimitive.Image = Resources.TV_search;
radButtonElement.BorderElement.ShouldPaint = false;
this.radtxtFilter.RightButtonItems.Add(radButtonElement);
Upvotes: 0
Reputation: 484
The easiest way to eliminate the border around the right button element is to manipulate its Visibility property:
RadButtonElement radButtonElement = new RadButtonElement();
radButtonElement.Text = "";
radButtonElement.DisplayStyle = Telerik.WinControls.DisplayStyle.Text;
radButtonElement.TextElement.CustomFont = "TelerikWebUI";
radButtonElement.TextElement.CustomFontSize = 10;
radButtonElement.BorderElement.Visibility = ElementVisibility.Collapsed;
this.radButtonTextBox1.RightButtonItems.Add(radButtonElement);
Upvotes: 1