Changed: vertical controls on custom listbox

This commit is contained in:
Ray 2021-07-24 22:15:55 +01:00
parent 5af2eb7b54
commit 1be6d665f1
4 changed files with 105 additions and 110 deletions

View File

@ -39,7 +39,7 @@
this.StyleDown = new ButtonStyle() this.StyleDown = new ButtonStyle()
{ {
BackColour = Color.FromArgb(0, 183, 209), BackColour = Color.FromArgb(0, 183, 209),
PenColour = Color.Black, PenColour = Color.White,
ForeImage = this.DownImage ForeImage = this.DownImage
}; };
this.StyleOver = new ButtonStyle() this.StyleOver = new ButtonStyle()

View File

@ -1,4 +1,6 @@
namespace RyzStudio.Windows.ThemedForms using System.Drawing;
namespace RyzStudio.Windows.ThemedForms
{ {
partial class TListBox partial class TListBox
{ {
@ -28,12 +30,14 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container();
this.listBox1 = new System.Windows.Forms.ListBox(); this.listBox1 = new System.Windows.Forms.ListBox();
this.imageBox5 = new RyzStudio.Windows.Forms.TImageBox(); this.imageBox5 = new RyzStudio.Windows.Forms.TImageBox();
this.imageBox4 = new RyzStudio.Windows.Forms.TImageBox(); this.imageBox4 = new RyzStudio.Windows.Forms.TImageBox();
this.imageBox3 = new RyzStudio.Windows.Forms.TImageBox(); this.imageBox3 = new RyzStudio.Windows.Forms.TImageBox();
this.imageBox2 = new RyzStudio.Windows.Forms.TImageBox(); this.imageBox2 = new RyzStudio.Windows.Forms.TImageBox();
this.imageBox1 = new RyzStudio.Windows.Forms.TImageBox(); this.imageBox1 = new RyzStudio.Windows.Forms.TImageBox();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
((System.ComponentModel.ISupportInitialize)(this.imageBox5)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.imageBox5)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.imageBox4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.imageBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.imageBox3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.imageBox3)).BeginInit();
@ -46,106 +50,153 @@
this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.listBox1.BackColor = System.Drawing.Color.FromKnownColor(KnownColor.Window);
this.listBox1.FormattingEnabled = true; this.listBox1.FormattingEnabled = true;
this.listBox1.ItemHeight = 15;
this.listBox1.Location = new System.Drawing.Point(4, 4); this.listBox1.Location = new System.Drawing.Point(4, 4);
this.listBox1.Name = "listBox1"; this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(121, 82); this.listBox1.Size = new System.Drawing.Size(98, 109);
this.listBox1.TabIndex = 0; this.listBox1.TabIndex = 0;
this.listBox1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBox1_MouseDoubleClick); this.listBox1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBox1_MouseDoubleClick);
this.listBox1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.listBox1_PreviewKeyDown); this.listBox1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.listBox1_PreviewKeyDown);
// //
// imageBox5 // imageBox5
// //
this.imageBox5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.imageBox5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.imageBox5.BackColor = System.Drawing.Color.Transparent; this.imageBox5.BackColor = System.Drawing.Color.Transparent;
this.imageBox5.BackColorHover = System.Drawing.Color.Transparent;
this.imageBox5.BackColorNormal = System.Drawing.Color.Transparent;
this.imageBox5.BackColorSelected = System.Drawing.Color.Transparent;
this.imageBox5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.imageBox5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.imageBox5.ErrorImage = null; this.imageBox5.ErrorImage = null;
this.imageBox5.ImageHover = global::FizzyLauncher.UIResource.edit2; this.imageBox5.HoverImage = global::FizzyLauncher.UIResource.edit2;
this.imageBox5.Image = global::FizzyLauncher.UIResource.edit; this.imageBox5.Image = global::FizzyLauncher.UIResource.edit;
this.imageBox5.InitialImage = null; this.imageBox5.ImageHover = global::FizzyLauncher.UIResource.edit2;
this.imageBox5.Location = new System.Drawing.Point(52, 94);
this.imageBox5.Name = "imageBox5";
this.imageBox5.ImageNormal = global::FizzyLauncher.UIResource.edit; this.imageBox5.ImageNormal = global::FizzyLauncher.UIResource.edit;
this.imageBox5.Size = new System.Drawing.Size(18, 25); this.imageBox5.ImageSelected = null;
this.imageBox5.InitialImage = null;
this.imageBox5.IsSelected = false;
this.imageBox5.Location = new System.Drawing.Point(106, 48);
this.imageBox5.Name = "imageBox5";
this.imageBox5.NormalImage = global::FizzyLauncher.UIResource.edit;
this.imageBox5.SelectedImage = null;
this.imageBox5.Size = new System.Drawing.Size(18, 18);
this.imageBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.imageBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.imageBox5.TabIndex = 6; this.imageBox5.TabIndex = 6;
this.imageBox5.TabStop = false; this.imageBox5.TabStop = false;
this.toolTip1.SetToolTip(this.imageBox5, "Edit Item");
this.imageBox5.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox5_MouseClick); this.imageBox5.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox5_MouseClick);
this.imageBox5.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox5_MouseClick); this.imageBox5.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox5_MouseClick);
// //
// imageBox4 // imageBox4
// //
this.imageBox4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.imageBox4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.imageBox4.BackColor = System.Drawing.Color.Transparent; this.imageBox4.BackColor = System.Drawing.Color.Transparent;
this.imageBox4.BackColorHover = System.Drawing.Color.Transparent;
this.imageBox4.BackColorNormal = System.Drawing.Color.Transparent;
this.imageBox4.BackColorSelected = System.Drawing.Color.Transparent;
this.imageBox4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.imageBox4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.imageBox4.ErrorImage = null; this.imageBox4.ErrorImage = null;
this.imageBox4.ImageHover = global::FizzyLauncher.UIResource.arrow_down2; this.imageBox4.HoverImage = global::FizzyLauncher.UIResource.arrow_down2;
this.imageBox4.Image = global::FizzyLauncher.UIResource.arrow_down; this.imageBox4.Image = global::FizzyLauncher.UIResource.arrow_down;
this.imageBox4.InitialImage = null; this.imageBox4.ImageHover = global::FizzyLauncher.UIResource.arrow_down2;
this.imageBox4.Location = new System.Drawing.Point(100, 94);
this.imageBox4.Name = "imageBox4";
this.imageBox4.ImageNormal = global::FizzyLauncher.UIResource.arrow_down; this.imageBox4.ImageNormal = global::FizzyLauncher.UIResource.arrow_down;
this.imageBox4.Size = new System.Drawing.Size(18, 25); this.imageBox4.ImageSelected = null;
this.imageBox4.InitialImage = null;
this.imageBox4.IsSelected = false;
this.imageBox4.Location = new System.Drawing.Point(106, 92);
this.imageBox4.Name = "imageBox4";
this.imageBox4.NormalImage = global::FizzyLauncher.UIResource.arrow_down;
this.imageBox4.SelectedImage = null;
this.imageBox4.Size = new System.Drawing.Size(18, 18);
this.imageBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.imageBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.imageBox4.TabIndex = 5; this.imageBox4.TabIndex = 5;
this.imageBox4.TabStop = false; this.imageBox4.TabStop = false;
this.toolTip1.SetToolTip(this.imageBox4, "Move Bottom");
this.imageBox4.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox4_MouseClick); this.imageBox4.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox4_MouseClick);
this.imageBox4.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox4_MouseClick); this.imageBox4.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox4_MouseClick);
// //
// imageBox3 // imageBox3
// //
this.imageBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.imageBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.imageBox3.BackColor = System.Drawing.Color.Transparent; this.imageBox3.BackColor = System.Drawing.Color.Transparent;
this.imageBox3.BackColorHover = System.Drawing.Color.Transparent;
this.imageBox3.BackColorNormal = System.Drawing.Color.Transparent;
this.imageBox3.BackColorSelected = System.Drawing.Color.Transparent;
this.imageBox3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.imageBox3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.imageBox3.ErrorImage = null; this.imageBox3.ErrorImage = null;
this.imageBox3.ImageHover = global::FizzyLauncher.UIResource.arrow_up2; this.imageBox3.HoverImage = global::FizzyLauncher.UIResource.arrow_up2;
this.imageBox3.Image = global::FizzyLauncher.UIResource.arrow_up; this.imageBox3.Image = global::FizzyLauncher.UIResource.arrow_up;
this.imageBox3.InitialImage = null; this.imageBox3.ImageHover = global::FizzyLauncher.UIResource.arrow_up2;
this.imageBox3.Location = new System.Drawing.Point(76, 94);
this.imageBox3.Name = "imageBox3";
this.imageBox3.ImageNormal = global::FizzyLauncher.UIResource.arrow_up; this.imageBox3.ImageNormal = global::FizzyLauncher.UIResource.arrow_up;
this.imageBox3.Size = new System.Drawing.Size(18, 25); this.imageBox3.ImageSelected = null;
this.imageBox3.InitialImage = null;
this.imageBox3.IsSelected = false;
this.imageBox3.Location = new System.Drawing.Point(106, 72);
this.imageBox3.Name = "imageBox3";
this.imageBox3.NormalImage = global::FizzyLauncher.UIResource.arrow_up;
this.imageBox3.SelectedImage = null;
this.imageBox3.Size = new System.Drawing.Size(18, 18);
this.imageBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.imageBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.imageBox3.TabIndex = 4; this.imageBox3.TabIndex = 4;
this.imageBox3.TabStop = false; this.imageBox3.TabStop = false;
this.toolTip1.SetToolTip(this.imageBox3, "Move Up");
this.imageBox3.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox3_MouseClick); this.imageBox3.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox3_MouseClick);
this.imageBox3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox3_MouseClick); this.imageBox3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox3_MouseClick);
// //
// imageBox2 // imageBox2
// //
this.imageBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.imageBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.imageBox2.BackColor = System.Drawing.Color.Transparent; this.imageBox2.BackColor = System.Drawing.Color.Transparent;
this.imageBox2.BackColorHover = System.Drawing.Color.Transparent;
this.imageBox2.BackColorNormal = System.Drawing.Color.Transparent;
this.imageBox2.BackColorSelected = System.Drawing.Color.Transparent;
this.imageBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.imageBox2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.imageBox2.ErrorImage = null; this.imageBox2.ErrorImage = null;
this.imageBox2.ImageHover = global::FizzyLauncher.UIResource.minus2; this.imageBox2.HoverImage = global::FizzyLauncher.UIResource.minus2;
this.imageBox2.Image = global::FizzyLauncher.UIResource.minus; this.imageBox2.Image = global::FizzyLauncher.UIResource.minus;
this.imageBox2.InitialImage = null; this.imageBox2.ImageHover = global::FizzyLauncher.UIResource.minus2;
this.imageBox2.Location = new System.Drawing.Point(28, 94);
this.imageBox2.Name = "imageBox2";
this.imageBox2.ImageNormal = global::FizzyLauncher.UIResource.minus; this.imageBox2.ImageNormal = global::FizzyLauncher.UIResource.minus;
this.imageBox2.Size = new System.Drawing.Size(18, 25); this.imageBox2.ImageSelected = null;
this.imageBox2.InitialImage = null;
this.imageBox2.IsSelected = false;
this.imageBox2.Location = new System.Drawing.Point(106, 24);
this.imageBox2.Name = "imageBox2";
this.imageBox2.NormalImage = global::FizzyLauncher.UIResource.minus;
this.imageBox2.SelectedImage = null;
this.imageBox2.Size = new System.Drawing.Size(18, 18);
this.imageBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.imageBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.imageBox2.TabIndex = 3; this.imageBox2.TabIndex = 3;
this.imageBox2.TabStop = false; this.imageBox2.TabStop = false;
this.toolTip1.SetToolTip(this.imageBox2, "Remove Item");
this.imageBox2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox2_MouseClick); this.imageBox2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox2_MouseClick);
this.imageBox2.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox2_MouseClick); this.imageBox2.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox2_MouseClick);
// //
// imageBox1 // imageBox1
// //
this.imageBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.imageBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.imageBox1.BackColor = System.Drawing.Color.Transparent; this.imageBox1.BackColor = System.Drawing.Color.Transparent;
this.imageBox1.BackColorHover = System.Drawing.Color.Transparent;
this.imageBox1.BackColorNormal = System.Drawing.Color.Transparent;
this.imageBox1.BackColorSelected = System.Drawing.Color.Transparent;
this.imageBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.imageBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.imageBox1.ErrorImage = null; this.imageBox1.ErrorImage = null;
this.imageBox1.ImageHover = global::FizzyLauncher.UIResource.plus2; this.imageBox1.HoverImage = global::FizzyLauncher.UIResource.plus2;
this.imageBox1.Image = global::FizzyLauncher.UIResource.plus; this.imageBox1.Image = global::FizzyLauncher.UIResource.plus;
this.imageBox1.InitialImage = null; this.imageBox1.ImageHover = global::FizzyLauncher.UIResource.plus2;
this.imageBox1.Location = new System.Drawing.Point(4, 94);
this.imageBox1.Name = "imageBox1";
this.imageBox1.ImageNormal = global::FizzyLauncher.UIResource.plus; this.imageBox1.ImageNormal = global::FizzyLauncher.UIResource.plus;
this.imageBox1.Size = new System.Drawing.Size(18, 25); this.imageBox1.ImageSelected = null;
this.imageBox1.InitialImage = null;
this.imageBox1.IsSelected = false;
this.imageBox1.Location = new System.Drawing.Point(106, 4);
this.imageBox1.Name = "imageBox1";
this.imageBox1.NormalImage = global::FizzyLauncher.UIResource.plus;
this.imageBox1.SelectedImage = null;
this.imageBox1.Size = new System.Drawing.Size(18, 18);
this.imageBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; this.imageBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.imageBox1.TabIndex = 2; this.imageBox1.TabIndex = 2;
this.imageBox1.TabStop = false; this.imageBox1.TabStop = false;
this.toolTip1.SetToolTip(this.imageBox1, "Add Item");
this.imageBox1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox1_MouseClick); this.imageBox1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox1_MouseClick);
this.imageBox1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox1_MouseClick); this.imageBox1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox1_MouseClick);
// //
@ -178,5 +229,6 @@
private Forms.TImageBox imageBox3; private Forms.TImageBox imageBox3;
private Forms.TImageBox imageBox4; private Forms.TImageBox imageBox4;
private Forms.TImageBox imageBox5; private Forms.TImageBox imageBox5;
private System.Windows.Forms.ToolTip toolTip1;
} }
} }

View File

@ -1,64 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <root>
<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
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<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
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
mimetype set.
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
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
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
: 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
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">
@ -117,4 +57,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> </root>