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