From 1be6d665f1a246771bbf8d6a1c191af2d6a1efad Mon Sep 17 00:00:00 2001 From: Ray Date: Sat, 24 Jul 2021 22:15:55 +0100 Subject: [PATCH] Changed: vertical controls on custom listbox --- RyzStudio/Windows/ThemedForms/TButton.cs | 2 +- .../Windows/ThemedForms/TListBox.designer.cs | 116 +++++++++++++----- RyzStudio/Windows/ThemedForms/TListBox.resx | 65 +--------- Windows/Forms/EditGroupForm.cs | 32 ++--- 4 files changed, 105 insertions(+), 110 deletions(-) diff --git a/RyzStudio/Windows/ThemedForms/TButton.cs b/RyzStudio/Windows/ThemedForms/TButton.cs index b6e4d93..bfbd556 100644 --- a/RyzStudio/Windows/ThemedForms/TButton.cs +++ b/RyzStudio/Windows/ThemedForms/TButton.cs @@ -39,7 +39,7 @@ this.StyleDown = new ButtonStyle() { BackColour = Color.FromArgb(0, 183, 209), - PenColour = Color.Black, + PenColour = Color.White, ForeImage = this.DownImage }; this.StyleOver = new ButtonStyle() diff --git a/RyzStudio/Windows/ThemedForms/TListBox.designer.cs b/RyzStudio/Windows/ThemedForms/TListBox.designer.cs index 469e7b0..cee2554 100644 --- a/RyzStudio/Windows/ThemedForms/TListBox.designer.cs +++ b/RyzStudio/Windows/ThemedForms/TListBox.designer.cs @@ -1,4 +1,6 @@ -namespace RyzStudio.Windows.ThemedForms +using System.Drawing; + +namespace RyzStudio.Windows.ThemedForms { partial class TListBox { @@ -28,12 +30,14 @@ /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.listBox1 = new System.Windows.Forms.ListBox(); this.imageBox5 = new RyzStudio.Windows.Forms.TImageBox(); this.imageBox4 = new RyzStudio.Windows.Forms.TImageBox(); this.imageBox3 = new RyzStudio.Windows.Forms.TImageBox(); this.imageBox2 = 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.imageBox4)).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) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.listBox1.BackColor = System.Drawing.Color.FromKnownColor(KnownColor.Window); this.listBox1.FormattingEnabled = true; + this.listBox1.ItemHeight = 15; this.listBox1.Location = new System.Drawing.Point(4, 4); 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.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBox1_MouseDoubleClick); this.listBox1.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.listBox1_PreviewKeyDown); // // 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.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.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.InitialImage = null; - this.imageBox5.Location = new System.Drawing.Point(52, 94); - this.imageBox5.Name = "imageBox5"; + this.imageBox5.ImageHover = global::FizzyLauncher.UIResource.edit2; 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.TabIndex = 6; this.imageBox5.TabStop = false; + this.toolTip1.SetToolTip(this.imageBox5, "Edit Item"); this.imageBox5.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox5_MouseClick); this.imageBox5.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox5_MouseClick); // // 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.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.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.InitialImage = null; - this.imageBox4.Location = new System.Drawing.Point(100, 94); - this.imageBox4.Name = "imageBox4"; + this.imageBox4.ImageHover = global::FizzyLauncher.UIResource.arrow_down2; 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.TabIndex = 5; this.imageBox4.TabStop = false; + this.toolTip1.SetToolTip(this.imageBox4, "Move Bottom"); this.imageBox4.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox4_MouseClick); this.imageBox4.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox4_MouseClick); // // 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.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.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.InitialImage = null; - this.imageBox3.Location = new System.Drawing.Point(76, 94); - this.imageBox3.Name = "imageBox3"; + this.imageBox3.ImageHover = global::FizzyLauncher.UIResource.arrow_up2; 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.TabIndex = 4; this.imageBox3.TabStop = false; + this.toolTip1.SetToolTip(this.imageBox3, "Move Up"); this.imageBox3.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox3_MouseClick); this.imageBox3.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox3_MouseClick); // // 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.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.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.InitialImage = null; - this.imageBox2.Location = new System.Drawing.Point(28, 94); - this.imageBox2.Name = "imageBox2"; + this.imageBox2.ImageHover = global::FizzyLauncher.UIResource.minus2; 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.TabIndex = 3; this.imageBox2.TabStop = false; + this.toolTip1.SetToolTip(this.imageBox2, "Remove Item"); this.imageBox2.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox2_MouseClick); this.imageBox2.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.imageBox2_MouseClick); // // 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.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.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.InitialImage = null; - this.imageBox1.Location = new System.Drawing.Point(4, 94); - this.imageBox1.Name = "imageBox1"; + this.imageBox1.ImageHover = global::FizzyLauncher.UIResource.plus2; 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.TabIndex = 2; this.imageBox1.TabStop = false; + this.toolTip1.SetToolTip(this.imageBox1, "Add Item"); this.imageBox1.MouseClick += 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 imageBox4; private Forms.TImageBox imageBox5; + private System.Windows.Forms.ToolTip toolTip1; } } diff --git a/RyzStudio/Windows/ThemedForms/TListBox.resx b/RyzStudio/Windows/ThemedForms/TListBox.resx index 1af7de1..57523cc 100644 --- a/RyzStudio/Windows/ThemedForms/TListBox.resx +++ b/RyzStudio/Windows/ThemedForms/TListBox.resx @@ -1,64 +1,4 @@ - - - + @@ -117,4 +57,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file diff --git a/Windows/Forms/EditGroupForm.cs b/Windows/Forms/EditGroupForm.cs index c3108d9..8b85caa 100644 --- a/Windows/Forms/EditGroupForm.cs +++ b/Windows/Forms/EditGroupForm.cs @@ -40,10 +40,10 @@ namespace FizzyLauncher.Windows.Forms this.pickerBox1 = new RyzStudio.Windows.ThemedForms.TPickerBox(); this.horizontalSeparator2 = new RyzStudio.Windows.Forms.THorizontalSeparator(); this.SuspendLayout(); - // + // // textBox1 - // - this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + // + this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.textBox1.BackColor = System.Drawing.Color.Transparent; this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); @@ -55,9 +55,9 @@ namespace FizzyLauncher.Windows.Forms this.textBox1.SubmitButton = null; this.textBox1.TabIndex = 152; this.textBox1.UseSystemPasswordChar = false; - // + // // label2 - // + // this.label2.AutoSize = true; this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.ForeColor = System.Drawing.SystemColors.ControlText; @@ -68,9 +68,9 @@ namespace FizzyLauncher.Windows.Forms this.label2.TabIndex = 155; this.label2.Text = "Show Only Expanded"; this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // + // // label1 - // + // this.label1.AutoSize = true; this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.ForeColor = System.Drawing.SystemColors.ControlText; @@ -82,9 +82,9 @@ namespace FizzyLauncher.Windows.Forms this.label1.TabIndex = 153; this.label1.Text = "Title"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // + // // button1 - // + // this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.button1.BackColor = System.Drawing.Color.Transparent; this.button1.DefaultImage = null; @@ -99,9 +99,9 @@ namespace FizzyLauncher.Windows.Forms this.button1.Size = new System.Drawing.Size(128, 32); this.button1.TabIndex = 173; this.button1.Click += new System.EventHandler(this.button1_Click); - // + // // pickerBox1 - // + // this.pickerBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.pickerBox1.BackColor = System.Drawing.Color.Transparent; this.pickerBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point); @@ -112,10 +112,10 @@ namespace FizzyLauncher.Windows.Forms this.pickerBox1.Size = new System.Drawing.Size(84, 34); this.pickerBox1.SubmitButton = null; this.pickerBox1.TabIndex = 174; - // + // // horizontalSeparator2 - // - this.horizontalSeparator2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + // + this.horizontalSeparator2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.horizontalSeparator2.AutoScrollMargin = new System.Drawing.Size(0, 0); this.horizontalSeparator2.AutoScrollMinSize = new System.Drawing.Size(0, 0); @@ -128,9 +128,9 @@ namespace FizzyLauncher.Windows.Forms this.horizontalSeparator2.Padding = new System.Windows.Forms.Padding(0, 10, 0, 10); this.horizontalSeparator2.Size = new System.Drawing.Size(364, 22); this.horizontalSeparator2.TabIndex = 182; - // + // // EditGroupForm - // + // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.ClientSize = new System.Drawing.Size(384, 521); this.Controls.Add(this.horizontalSeparator2);