[英]radbuttontelerik/winform/c#: how to remove border of the icon?
I have this searcher我有这个搜索器
I would like to remove the border of the glass.我想去掉玻璃的边框。
It is a RadButtonTextBox in Winform in c# .它是c# Winform中的 RadButtonTextBox 。
I thried modifing the colors of textbox and I didn't get what I need:我尝试修改文本框的 colors ,但没有得到我需要的:
this.radtxtFilter.RightButtonItems[0].EnableBorderHighlight = false;
this.radtxtFilter.RightButtonItems[0].BorderHighlightColor = System.Drawing.Color.Red;
How can I do it?我该怎么做?
The easiest way to eliminate the border around the right button element is to manipulate its Visibility property:消除右键元素周围边框的最简单方法是操作其 Visibility 属性:
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);
Property ShouldPaint is the answer:属性 ShouldPaint 是答案:
RadButtonElement radButtonElement = new RadButtonElement();
radButtonElement.ImagePrimitive.Image = Resources.TV_search;
radButtonElement.BorderElement.ShouldPaint = false;
this.radtxtFilter.RightButtonItems.Add(radButtonElement);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.