* UIRichTextBox: 修改滚动条颜色跟随主题
This commit is contained in:
parent
bac0f32fd2
commit
abab088e0b
@ -24,6 +24,7 @@
|
||||
* 2022-11-03: V3.2.6 增加了可设置垂直滚动条宽度的属性
|
||||
* 2023-11-13: V3.5.2 重构主题
|
||||
* 2023-12-25: V3.6.2 增加Text的属性编辑器
|
||||
* 2024-07-20: V3.6.8 修改滚动条颜色跟随主题
|
||||
******************************************************************************/
|
||||
|
||||
using System;
|
||||
@ -506,40 +507,40 @@ namespace Sunny.UI
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.edit = new System.Windows.Forms.RichTextBox();
|
||||
this.bar = new Sunny.UI.UIScrollBar();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
edit = new RichTextBox();
|
||||
bar = new UIScrollBar();
|
||||
SuspendLayout();
|
||||
//
|
||||
// edit
|
||||
//
|
||||
this.edit.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.edit.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.edit.Location = new System.Drawing.Point(2, 2);
|
||||
this.edit.Name = "edit";
|
||||
this.edit.Size = new System.Drawing.Size(266, 176);
|
||||
this.edit.TabIndex = 0;
|
||||
this.edit.Text = "";
|
||||
//
|
||||
//
|
||||
edit.BorderStyle = BorderStyle.None;
|
||||
edit.Dock = DockStyle.Fill;
|
||||
edit.Location = new Point(2, 2);
|
||||
edit.Name = "edit";
|
||||
edit.Size = new Size(266, 176);
|
||||
edit.TabIndex = 0;
|
||||
edit.Text = "";
|
||||
//
|
||||
// bar
|
||||
//
|
||||
this.bar.Font = new System.Drawing.Font("宋体", 12F);
|
||||
this.bar.Location = new System.Drawing.Point(247, 4);
|
||||
this.bar.Name = "bar";
|
||||
this.bar.Size = new System.Drawing.Size(19, 173);
|
||||
this.bar.Style = Sunny.UI.UIStyle.Custom;
|
||||
this.bar.TabIndex = 2;
|
||||
this.bar.Text = "uiScrollBar1";
|
||||
//
|
||||
//
|
||||
bar.Font = new Font("宋体", 12F);
|
||||
bar.Location = new Point(247, 4);
|
||||
bar.MinimumSize = new Size(1, 1);
|
||||
bar.Name = "bar";
|
||||
bar.Size = new Size(19, 173);
|
||||
bar.TabIndex = 2;
|
||||
bar.Text = "uiScrollBar1";
|
||||
//
|
||||
// UIRichTextBox
|
||||
//
|
||||
this.Controls.Add(this.bar);
|
||||
this.Controls.Add(this.edit);
|
||||
this.FillColor = System.Drawing.Color.White;
|
||||
this.Name = "UIRichTextBox";
|
||||
this.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.FontChanged += new System.EventHandler(this.UIRichTextBox_FontChanged);
|
||||
this.SizeChanged += new System.EventHandler(this.UIRichTextBox_SizeChanged);
|
||||
this.ResumeLayout(false);
|
||||
//
|
||||
Controls.Add(bar);
|
||||
Controls.Add(edit);
|
||||
FillColor = Color.White;
|
||||
Name = "UIRichTextBox";
|
||||
Padding = new Padding(2);
|
||||
FontChanged += UIRichTextBox_FontChanged;
|
||||
SizeChanged += UIRichTextBox_SizeChanged;
|
||||
ResumeLayout(false);
|
||||
}
|
||||
|
||||
private void UIRichTextBox_SizeChanged(object sender, EventArgs e)
|
||||
|
@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
@ -26,36 +26,36 @@
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
|
Loading…
x
Reference in New Issue
Block a user