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:
Scionwest_cp 2009-11-14 09:48:43 -08:00
parent 8fde0bcc43
commit d6a999c729
2 changed files with 12 additions and 0 deletions

View file

@ -62,6 +62,7 @@ namespace VisualDesigner
button.Text = t;
button.AllowDrop = true;
button.MouseDown += new MouseEventHandler(newObject_MouseDown);
button.FlatStyle = FlatStyle.Flat;
flowLayoutPanel1.Controls.Add(button);
}
@ -97,7 +98,11 @@ namespace VisualDesigner
else
{
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.SelectedTab = tab;
}
}
}
@ -108,5 +113,11 @@ namespace VisualDesigner
{
e.Effect = DragDropEffects.Copy;
}
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
currentScript = engine.GetObject(tabControl1.SelectedTab.Text);
propertyGrid1.SelectedObject = currentScript.Instance;
}
}
}