* UIRichTextBox:增加右键菜单
This commit is contained in:
parent
0cd12d900b
commit
dc2c9bc740
Binary file not shown.
BIN
Bin/SunnyUI.dll
BIN
Bin/SunnyUI.dll
Binary file not shown.
22
SunnyUI.Demo/Controls/FTextBox.Designer.cs
generated
22
SunnyUI.Demo/Controls/FTextBox.Designer.cs
generated
@ -43,7 +43,10 @@
|
||||
this.uiLine2 = new Sunny.UI.UILine();
|
||||
this.uiLine3 = new Sunny.UI.UILine();
|
||||
this.uiTextBox4 = new Sunny.UI.UITextBox();
|
||||
this.uiContextMenuStrip1 = new Sunny.UI.UIContextMenuStrip();
|
||||
this.aaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.PagePanel.SuspendLayout();
|
||||
this.uiContextMenuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PagePanel
|
||||
@ -214,6 +217,7 @@
|
||||
// uiRichTextBox1
|
||||
//
|
||||
this.uiRichTextBox1.AutoWordSelection = true;
|
||||
this.uiRichTextBox1.ContextMenuStrip = this.uiContextMenuStrip1;
|
||||
this.uiRichTextBox1.FillColor = System.Drawing.Color.White;
|
||||
this.uiRichTextBox1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiRichTextBox1.Location = new System.Drawing.Point(388, 219);
|
||||
@ -269,6 +273,20 @@
|
||||
"nnyUI技术交流群),请给源码项目点个Star吧!!!";
|
||||
this.uiTextBox4.Watermark = "水印文字";
|
||||
//
|
||||
// uiContextMenuStrip1
|
||||
//
|
||||
this.uiContextMenuStrip1.Font = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.uiContextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.aaToolStripMenuItem});
|
||||
this.uiContextMenuStrip1.Name = "uiContextMenuStrip1";
|
||||
this.uiContextMenuStrip1.Size = new System.Drawing.Size(99, 30);
|
||||
//
|
||||
// aaToolStripMenuItem
|
||||
//
|
||||
this.aaToolStripMenuItem.Name = "aaToolStripMenuItem";
|
||||
this.aaToolStripMenuItem.Size = new System.Drawing.Size(98, 26);
|
||||
this.aaToolStripMenuItem.Text = "aa";
|
||||
//
|
||||
// FTextBox
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);
|
||||
@ -277,8 +295,10 @@
|
||||
this.Name = "FTextBox";
|
||||
this.Symbol = 61962;
|
||||
this.Text = "TextBox";
|
||||
this.Controls.SetChildIndex(this.PagePanel, 0);
|
||||
this.PagePanel.ResumeLayout(false);
|
||||
this.PagePanel.PerformLayout();
|
||||
this.uiContextMenuStrip1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@ -299,5 +319,7 @@
|
||||
private UITextBox uiTextBox4;
|
||||
private UILine uiLine3;
|
||||
private UILine uiLine2;
|
||||
private UIContextMenuStrip uiContextMenuStrip1;
|
||||
private System.Windows.Forms.ToolStripMenuItem aaToolStripMenuItem;
|
||||
}
|
||||
}
|
@ -117,4 +117,7 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="uiContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
@ -69,6 +69,12 @@ namespace Sunny.UI
|
||||
timer.Start();
|
||||
}
|
||||
|
||||
protected override void OnContextMenuStripChanged(EventArgs e)
|
||||
{
|
||||
base.OnContextMenuStripChanged(e);
|
||||
listbox.ContextMenuStrip = ContextMenuStrip;
|
||||
}
|
||||
|
||||
private void Listbox_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
MouseMove?.Invoke(this, e);
|
||||
|
@ -46,6 +46,12 @@ namespace Sunny.UI
|
||||
edit.ScrollBars = RichTextBoxScrollBars.Vertical;
|
||||
}
|
||||
|
||||
protected override void OnContextMenuStripChanged(EventArgs e)
|
||||
{
|
||||
base.OnContextMenuStripChanged(e);
|
||||
edit.ContextMenuStrip = ContextMenuStrip;
|
||||
}
|
||||
|
||||
protected override void OnFontChanged(EventArgs e)
|
||||
{
|
||||
base.OnFontChanged(e);
|
||||
|
Loading…
x
Reference in New Issue
Block a user