Browse Source

* UITreeView:背景色可改,设置FillColor,以及SystemCustomMode = true

pull/95/head
Sunny 5 years ago
parent
commit
c51f20f860
  1. BIN
      Bin/SunnyUI.dll
  2. BIN
      Bin/SunnyUI.pdb
  3. BIN
      SunnyUI.Demo/Bin/SunnyUI.Demo.exe
  4. BIN
      SunnyUI.Demo/Bin/SunnyUI.dll
  5. 6
      SunnyUI.Demo/Controls/FTreeView.Designer.cs
  6. 9
      SunnyUI/Controls/UITreeView.cs

BIN
Bin/SunnyUI.dll

BIN
Bin/SunnyUI.pdb

BIN
SunnyUI.Demo/Bin/SunnyUI.Demo.exe

BIN
SunnyUI.Demo/Bin/SunnyUI.dll

6
SunnyUI.Demo/Controls/FTreeView.Designer.cs

@ -72,11 +72,13 @@
//
// uiTreeView1
//
this.uiTreeView1.BackColor = System.Drawing.Color.White;
this.uiTreeView1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.uiTreeView1.CheckBoxes = true;
this.uiTreeView1.FillColor = System.Drawing.Color.White;
this.uiTreeView1.Font = new System.Drawing.Font("微软雅黑", 12F);
this.uiTreeView1.Location = new System.Drawing.Point(33, 54);
this.uiTreeView1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.uiTreeView1.MinimumSize = new System.Drawing.Size(1, 1);
this.uiTreeView1.Name = "uiTreeView1";
treeNode1.Name = "节点8";
treeNode1.Text = "节点8";
@ -130,6 +132,8 @@
this.uiTreeView1.SelectedNode = null;
this.uiTreeView1.ShowLines = true;
this.uiTreeView1.Size = new System.Drawing.Size(266, 313);
this.uiTreeView1.Style = Sunny.UI.UIStyle.Custom;
this.uiTreeView1.StyleCustomMode = true;
this.uiTreeView1.TabIndex = 0;
this.uiTreeView1.Text = null;
//

9
SunnyUI/Controls/UITreeView.cs

@ -66,8 +66,9 @@ namespace Sunny.UI
if (view != null)
{
view.SelectedForeColor = UIColor.White;
view.FillColor = view.BackColor = fillColor = UIColor.White;
rectColor = uiColor.RectColor;
view.BackColor = fillColor = UIColor.White;
view.SelectedColor = uiColor.TreeViewSelectedColor;
view.ForeColor = foreColor = UIFontColor.Primary;
view.HoverColor = uiColor.TreeViewHoverColor;
@ -76,6 +77,7 @@ namespace Sunny.UI
if (Bar != null)
{
Bar.FillColor = UIColor.White;
Bar.ForeColor = uiColor.PrimaryColor;
Bar.HoverColor = uiColor.ButtonFillHoverColor;
Bar.PressColor = uiColor.ButtonFillPressColor;
@ -92,6 +94,11 @@ namespace Sunny.UI
view.FillColor = color;
view.BackColor = color;
}
if (Bar != null)
{
Bar.FillColor = color;
}
}
protected override void AfterSetForeColor(Color color)

Loading…
Cancel
Save