private void CreateSheet(Sheet data) { TabPage newTab = new TabPage(); newTab.Tag = data; NotePage noteData = new NotePage(newTab, this); noteData.Location = new Point(0, 0); noteData.Size = newTab.Size; noteData.Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Left; newTab.Controls.Add(noteData); UpdateTitle(newTab); SheetSelection.TabPages.Add(newTab); }
private void AddSheet_Click(object sender, EventArgs e) { int cnt = SheetSelection.TabPages.Count + 1; Sheet nsheet = new Sheet("New sheet " + cnt.ToString()); //sheets.Add(nsheet); CreateSheet(nsheet); PSelected = SheetSelection.TabPages[SheetSelection.TabPages.Count - 1]; SheetSelection.SelectedTab = PSelected; }
private void SheetText_TextChanged(object sender, EventArgs e) { Sheet sheet = (Sheet)PMyPage.Tag; sheet.content = SheetText.Text; }