mirror of
https://github.com/colhountech/DarkUI.Net5.git
synced 2025-07-02 07:09:27 +03:00
Removed space key from radio button
This commit is contained in:
parent
f68f5c2197
commit
54a228cdd4
@ -237,34 +237,6 @@ namespace DarkUI.Controls
|
||||
SetControlState(DarkControlState.Hover);
|
||||
}
|
||||
|
||||
protected override void OnKeyDown(KeyEventArgs e)
|
||||
{
|
||||
base.OnKeyDown(e);
|
||||
|
||||
if (e.KeyCode == Keys.Space)
|
||||
{
|
||||
_spacePressed = true;
|
||||
SetControlState(DarkControlState.Pressed);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnKeyUp(KeyEventArgs e)
|
||||
{
|
||||
base.OnKeyUp(e);
|
||||
|
||||
if (e.KeyCode == Keys.Space)
|
||||
{
|
||||
_spacePressed = false;
|
||||
|
||||
var location = Cursor.Position;
|
||||
|
||||
if (!ClientRectangle.Contains(location))
|
||||
SetControlState(DarkControlState.Normal);
|
||||
else
|
||||
SetControlState(DarkControlState.Hover);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Paint Region
|
||||
|
162
Example/Forms/Docking/DockProperties.Designer.cs
generated
162
Example/Forms/Docking/DockProperties.Designer.cs
generated
@ -32,19 +32,24 @@ namespace Example
|
||||
{
|
||||
this.pnlMain = new System.Windows.Forms.Panel();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.darkCheckBox1 = new DarkUI.Controls.DarkCheckBox();
|
||||
this.darkCheckBox2 = new DarkUI.Controls.DarkCheckBox();
|
||||
this.darkCheckBox3 = new DarkUI.Controls.DarkCheckBox();
|
||||
this.darkRadioButton1 = new DarkUI.Controls.DarkRadioButton();
|
||||
this.darkRadioButton2 = new DarkUI.Controls.DarkRadioButton();
|
||||
this.darkRadioButton3 = new DarkUI.Controls.DarkRadioButton();
|
||||
this.darkRadioButton2 = new DarkUI.Controls.DarkRadioButton();
|
||||
this.darkRadioButton1 = new DarkUI.Controls.DarkRadioButton();
|
||||
this.darkTitle1 = new DarkUI.Controls.DarkTitle();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.darkCheckBox3 = new DarkUI.Controls.DarkCheckBox();
|
||||
this.darkCheckBox2 = new DarkUI.Controls.DarkCheckBox();
|
||||
this.darkCheckBox1 = new DarkUI.Controls.DarkCheckBox();
|
||||
this.darkTitle2 = new DarkUI.Controls.DarkTitle();
|
||||
this.pnlMain.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// pnlMain
|
||||
//
|
||||
this.pnlMain.Controls.Add(this.panel1);
|
||||
this.pnlMain.Controls.Add(this.panel2);
|
||||
this.pnlMain.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pnlMain.Location = new System.Drawing.Point(0, 25);
|
||||
this.pnlMain.Name = "pnlMain";
|
||||
@ -58,77 +63,113 @@ namespace Example
|
||||
this.panel1.Controls.Add(this.darkRadioButton3);
|
||||
this.panel1.Controls.Add(this.darkRadioButton2);
|
||||
this.panel1.Controls.Add(this.darkRadioButton1);
|
||||
this.panel1.Controls.Add(this.darkCheckBox3);
|
||||
this.panel1.Controls.Add(this.darkCheckBox2);
|
||||
this.panel1.Controls.Add(this.darkCheckBox1);
|
||||
this.panel1.Controls.Add(this.darkTitle1);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel1.Location = new System.Drawing.Point(10, 10);
|
||||
this.panel1.Location = new System.Drawing.Point(10, 103);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Padding = new System.Windows.Forms.Padding(0, 0, 0, 5);
|
||||
this.panel1.Size = new System.Drawing.Size(260, 152);
|
||||
this.panel1.TabIndex = 0;
|
||||
this.panel1.Padding = new System.Windows.Forms.Padding(0, 0, 0, 10);
|
||||
this.panel1.Size = new System.Drawing.Size(260, 93);
|
||||
this.panel1.TabIndex = 2;
|
||||
//
|
||||
// darkCheckBox1
|
||||
// darkRadioButton3
|
||||
//
|
||||
this.darkCheckBox1.AutoSize = true;
|
||||
this.darkCheckBox1.Location = new System.Drawing.Point(0, 0);
|
||||
this.darkCheckBox1.Name = "darkCheckBox1";
|
||||
this.darkCheckBox1.Size = new System.Drawing.Size(78, 19);
|
||||
this.darkCheckBox1.TabIndex = 1;
|
||||
this.darkCheckBox1.Text = "Checkbox";
|
||||
this.darkRadioButton3.AutoSize = true;
|
||||
this.darkRadioButton3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.darkRadioButton3.Enabled = false;
|
||||
this.darkRadioButton3.Location = new System.Drawing.Point(0, 64);
|
||||
this.darkRadioButton3.Name = "darkRadioButton3";
|
||||
this.darkRadioButton3.Size = new System.Drawing.Size(260, 19);
|
||||
this.darkRadioButton3.TabIndex = 6;
|
||||
this.darkRadioButton3.TabStop = true;
|
||||
this.darkRadioButton3.Text = "Disabled radiobutton";
|
||||
//
|
||||
// darkCheckBox2
|
||||
// darkRadioButton2
|
||||
//
|
||||
this.darkCheckBox2.AutoSize = true;
|
||||
this.darkCheckBox2.Enabled = false;
|
||||
this.darkCheckBox2.Location = new System.Drawing.Point(0, 25);
|
||||
this.darkCheckBox2.Name = "darkCheckBox2";
|
||||
this.darkCheckBox2.Size = new System.Drawing.Size(124, 19);
|
||||
this.darkCheckBox2.TabIndex = 2;
|
||||
this.darkCheckBox2.Text = "Disabled checkbox";
|
||||
this.darkRadioButton2.AutoSize = true;
|
||||
this.darkRadioButton2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.darkRadioButton2.Location = new System.Drawing.Point(0, 45);
|
||||
this.darkRadioButton2.Name = "darkRadioButton2";
|
||||
this.darkRadioButton2.Size = new System.Drawing.Size(260, 19);
|
||||
this.darkRadioButton2.TabIndex = 5;
|
||||
this.darkRadioButton2.TabStop = true;
|
||||
this.darkRadioButton2.Text = "Radiobutton";
|
||||
//
|
||||
// darkRadioButton1
|
||||
//
|
||||
this.darkRadioButton1.AutoSize = true;
|
||||
this.darkRadioButton1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.darkRadioButton1.Location = new System.Drawing.Point(0, 26);
|
||||
this.darkRadioButton1.Name = "darkRadioButton1";
|
||||
this.darkRadioButton1.Size = new System.Drawing.Size(260, 19);
|
||||
this.darkRadioButton1.TabIndex = 4;
|
||||
this.darkRadioButton1.TabStop = true;
|
||||
this.darkRadioButton1.Text = "Radiobutton";
|
||||
//
|
||||
// darkTitle1
|
||||
//
|
||||
this.darkTitle1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.darkTitle1.Location = new System.Drawing.Point(0, 0);
|
||||
this.darkTitle1.Name = "darkTitle1";
|
||||
this.darkTitle1.Size = new System.Drawing.Size(260, 26);
|
||||
this.darkTitle1.TabIndex = 7;
|
||||
this.darkTitle1.Text = "Radio buttons";
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.AutoSize = true;
|
||||
this.panel2.Controls.Add(this.darkCheckBox3);
|
||||
this.panel2.Controls.Add(this.darkCheckBox2);
|
||||
this.panel2.Controls.Add(this.darkCheckBox1);
|
||||
this.panel2.Controls.Add(this.darkTitle2);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel2.Location = new System.Drawing.Point(10, 10);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Padding = new System.Windows.Forms.Padding(0, 0, 0, 10);
|
||||
this.panel2.Size = new System.Drawing.Size(260, 93);
|
||||
this.panel2.TabIndex = 1;
|
||||
//
|
||||
// darkCheckBox3
|
||||
//
|
||||
this.darkCheckBox3.AutoSize = true;
|
||||
this.darkCheckBox3.Checked = true;
|
||||
this.darkCheckBox3.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.darkCheckBox3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.darkCheckBox3.Enabled = false;
|
||||
this.darkCheckBox3.Location = new System.Drawing.Point(0, 50);
|
||||
this.darkCheckBox3.Location = new System.Drawing.Point(0, 64);
|
||||
this.darkCheckBox3.Name = "darkCheckBox3";
|
||||
this.darkCheckBox3.Size = new System.Drawing.Size(171, 19);
|
||||
this.darkCheckBox3.TabIndex = 3;
|
||||
this.darkCheckBox3.Size = new System.Drawing.Size(260, 19);
|
||||
this.darkCheckBox3.TabIndex = 6;
|
||||
this.darkCheckBox3.Text = "Disabled checked checkbox";
|
||||
//
|
||||
// darkRadioButton1
|
||||
// darkCheckBox2
|
||||
//
|
||||
this.darkRadioButton1.AutoSize = true;
|
||||
this.darkRadioButton1.Location = new System.Drawing.Point(0, 75);
|
||||
this.darkRadioButton1.Name = "darkRadioButton1";
|
||||
this.darkRadioButton1.Size = new System.Drawing.Size(91, 19);
|
||||
this.darkRadioButton1.TabIndex = 4;
|
||||
this.darkRadioButton1.TabStop = true;
|
||||
this.darkRadioButton1.Text = "Radiobutton";
|
||||
this.darkCheckBox2.AutoSize = true;
|
||||
this.darkCheckBox2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.darkCheckBox2.Enabled = false;
|
||||
this.darkCheckBox2.Location = new System.Drawing.Point(0, 45);
|
||||
this.darkCheckBox2.Name = "darkCheckBox2";
|
||||
this.darkCheckBox2.Size = new System.Drawing.Size(260, 19);
|
||||
this.darkCheckBox2.TabIndex = 5;
|
||||
this.darkCheckBox2.Text = "Disabled checkbox";
|
||||
//
|
||||
// darkRadioButton2
|
||||
// darkCheckBox1
|
||||
//
|
||||
this.darkRadioButton2.AutoSize = true;
|
||||
this.darkRadioButton2.Location = new System.Drawing.Point(0, 100);
|
||||
this.darkRadioButton2.Name = "darkRadioButton2";
|
||||
this.darkRadioButton2.Size = new System.Drawing.Size(91, 19);
|
||||
this.darkRadioButton2.TabIndex = 5;
|
||||
this.darkRadioButton2.TabStop = true;
|
||||
this.darkRadioButton2.Text = "Radiobutton";
|
||||
this.darkCheckBox1.AutoSize = true;
|
||||
this.darkCheckBox1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.darkCheckBox1.Location = new System.Drawing.Point(0, 26);
|
||||
this.darkCheckBox1.Name = "darkCheckBox1";
|
||||
this.darkCheckBox1.Size = new System.Drawing.Size(260, 19);
|
||||
this.darkCheckBox1.TabIndex = 4;
|
||||
this.darkCheckBox1.Text = "Checkbox";
|
||||
//
|
||||
// darkRadioButton3
|
||||
// darkTitle2
|
||||
//
|
||||
this.darkRadioButton3.AutoSize = true;
|
||||
this.darkRadioButton3.Enabled = false;
|
||||
this.darkRadioButton3.Location = new System.Drawing.Point(0, 125);
|
||||
this.darkRadioButton3.Name = "darkRadioButton3";
|
||||
this.darkRadioButton3.Size = new System.Drawing.Size(136, 19);
|
||||
this.darkRadioButton3.TabIndex = 6;
|
||||
this.darkRadioButton3.TabStop = true;
|
||||
this.darkRadioButton3.Text = "Disabled radiobutton";
|
||||
this.darkTitle2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.darkTitle2.Location = new System.Drawing.Point(0, 0);
|
||||
this.darkTitle2.Name = "darkTitle2";
|
||||
this.darkTitle2.Size = new System.Drawing.Size(260, 26);
|
||||
this.darkTitle2.TabIndex = 8;
|
||||
this.darkTitle2.Text = "Check boxes";
|
||||
//
|
||||
// DockProperties
|
||||
//
|
||||
@ -145,6 +186,8 @@ namespace Example
|
||||
this.pnlMain.PerformLayout();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel2.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@ -153,11 +196,14 @@ namespace Example
|
||||
|
||||
private System.Windows.Forms.Panel pnlMain;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private DarkUI.Controls.DarkCheckBox darkCheckBox1;
|
||||
private DarkUI.Controls.DarkCheckBox darkCheckBox2;
|
||||
private DarkUI.Controls.DarkCheckBox darkCheckBox3;
|
||||
private DarkUI.Controls.DarkRadioButton darkRadioButton3;
|
||||
private DarkUI.Controls.DarkRadioButton darkRadioButton2;
|
||||
private DarkUI.Controls.DarkRadioButton darkRadioButton1;
|
||||
private DarkUI.Controls.DarkTitle darkTitle1;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private DarkUI.Controls.DarkCheckBox darkCheckBox3;
|
||||
private DarkUI.Controls.DarkCheckBox darkCheckBox2;
|
||||
private DarkUI.Controls.DarkCheckBox darkCheckBox1;
|
||||
private DarkUI.Controls.DarkTitle darkTitle2;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user