Visual Designer:
* Can now add multiple tabs when dragging objects onto the designer * Object properties are shown in the propertygrid when tabs are swapped. * Dragging an object onto any tab will create a new tab for that object.
This commit is contained in:
parent
8fde0bcc43
commit
d6a999c729
2 changed files with 12 additions and 0 deletions
1
VisualDesigner/frmDesigner.Designer.cs
generated
1
VisualDesigner/frmDesigner.Designer.cs
generated
|
@ -133,6 +133,7 @@
|
||||||
this.tabControl1.SelectedIndex = 0;
|
this.tabControl1.SelectedIndex = 0;
|
||||||
this.tabControl1.Size = new System.Drawing.Size(659, 568);
|
this.tabControl1.Size = new System.Drawing.Size(659, 568);
|
||||||
this.tabControl1.TabIndex = 0;
|
this.tabControl1.TabIndex = 0;
|
||||||
|
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
|
||||||
//
|
//
|
||||||
// page1
|
// page1
|
||||||
//
|
//
|
||||||
|
|
|
@ -62,6 +62,7 @@ namespace VisualDesigner
|
||||||
button.Text = t;
|
button.Text = t;
|
||||||
button.AllowDrop = true;
|
button.AllowDrop = true;
|
||||||
button.MouseDown += new MouseEventHandler(newObject_MouseDown);
|
button.MouseDown += new MouseEventHandler(newObject_MouseDown);
|
||||||
|
button.FlatStyle = FlatStyle.Flat;
|
||||||
flowLayoutPanel1.Controls.Add(button);
|
flowLayoutPanel1.Controls.Add(button);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +98,11 @@ namespace VisualDesigner
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TabPage tab = new TabPage(currentScript.Name);
|
TabPage tab = new TabPage(currentScript.Name);
|
||||||
|
tab.DragDrop +=new DragEventHandler(page1_DragDrop);
|
||||||
|
tab.DragEnter += new DragEventHandler(page1_DragEnter);
|
||||||
|
tab.AllowDrop = true;
|
||||||
tabControl1.TabPages.Add(tab);
|
tabControl1.TabPages.Add(tab);
|
||||||
|
tabControl1.SelectedTab = tab;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,5 +113,11 @@ namespace VisualDesigner
|
||||||
{
|
{
|
||||||
e.Effect = DragDropEffects.Copy;
|
e.Effect = DragDropEffects.Copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
currentScript = engine.GetObject(tabControl1.SelectedTab.Text);
|
||||||
|
propertyGrid1.SelectedObject = currentScript.Instance;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue