WinForms的DevExpress GridControl控件支持BorderStyle属性(通过它的View),但似乎它不支持BorderColor。或者我错了吗?
如何为GridControl边框设置BorderColor属性?
答案 0 :(得分:0)
您始终可以将BorderStyle设置为NoBorder并将GridControl包装在PanelControl中。
设置如下属性:
gridControl1.MainView.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
panelControl1.LookAndFeel.UseDefaultLookAndFeel = false;
panelControl1.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Flat;
panelControl1.Appearance.BorderColor = Color.Red;
panelControl1.Appearance.Options.UseBorderColor = true;
panelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple;
答案 1 :(得分:0)
你在使用皮肤吗?除非您禁用它们,否则蒙皮机制很可能会覆盖边框颜色设置。