protected virtual void FillTopToolbar() { Collection <SelectOption> options; SelectOption option; TopToolbar.Buttons.Add(new ToolbarButtons.Undo()); TopToolbar.Buttons.Add(new ToolbarButtons.Redo()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); TopToolbar.Buttons.Add(new ToolbarButtons.Bold()); TopToolbar.Buttons.Add(new ToolbarButtons.Italic()); TopToolbar.Buttons.Add(new ToolbarButtons.Underline()); TopToolbar.Buttons.Add(new ToolbarButtons.StrikeThrough()); TopToolbar.Buttons.Add(new ToolbarButtons.SubScript()); TopToolbar.Buttons.Add(new ToolbarButtons.SuperScript()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); TopToolbar.Buttons.Add(new ToolbarButtons.Ltr()); TopToolbar.Buttons.Add(new ToolbarButtons.Rtl()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); var FixedForeColor = new ToolbarButtons.FixedForeColor(); TopToolbar.Buttons.Add(FixedForeColor); var ForeColorSelector = new ToolbarButtons.ForeColorSelector(); ForeColorSelector.FixedColorButtonId = FixedForeColor.ID = "FixedForeColor"; TopToolbar.Buttons.Add(ForeColorSelector); TopToolbar.Buttons.Add(new ToolbarButtons.ForeColorClear()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); var FixedBackColor = new ToolbarButtons.FixedBackColor(); TopToolbar.Buttons.Add(FixedBackColor); var BackColorSelector = new ToolbarButtons.BackColorSelector(); BackColorSelector.FixedColorButtonId = FixedBackColor.ID = "FixedBackColor"; TopToolbar.Buttons.Add(BackColorSelector); TopToolbar.Buttons.Add(new ToolbarButtons.BackColorClear()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); TopToolbar.Buttons.Add(new ToolbarButtons.RemoveStyles()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); var fontName = new FontName(); TopToolbar.Buttons.Add(fontName); options = fontName.Options; option = new SelectOption { Text = "Arial", Value = "arial,helvetica,sans-serif" }; options.Add(option); option = new SelectOption { Text = "Courier New", Value = "courier new,courier,monospace" }; options.Add(option); option = new SelectOption { Text = "Georgia", Value = "georgia,times new roman,times,serif" }; options.Add(option); option = new SelectOption { Text = "Tahoma", Value = "tahoma,arial,helvetica,sans-serif" }; options.Add(option); option = new SelectOption { Text = "Times New Roman", Value = "times new roman,times,serif" }; options.Add(option); option = new SelectOption { Text = "Verdana", Value = "verdana,arial,helvetica,sans-serif" }; options.Add(option); option = new SelectOption { Text = "Impact", Value = "impact" }; options.Add(option); option = new SelectOption { Text = "WingDings", Value = "wingdings" }; options.Add(option); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); var fontSize = new ToolbarButtons.FontSize(); TopToolbar.Buttons.Add(fontSize); options = fontSize.Options; option = new SelectOption { Text = "1 ( 8 pt)", Value = "8pt" }; options.Add(option); option = new SelectOption { Text = "2 (10 pt)", Value = "10pt" }; options.Add(option); option = new SelectOption { Text = "3 (12 pt)", Value = "12pt" }; options.Add(option); option = new SelectOption { Text = "4 (14 pt)", Value = "14pt" }; options.Add(option); option = new SelectOption { Text = "5 (18 pt)", Value = "18pt" }; options.Add(option); option = new SelectOption { Text = "6 (24 pt)", Value = "24pt" }; options.Add(option); option = new SelectOption { Text = "7 (36 pt)", Value = "36pt" }; options.Add(option); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); TopToolbar.Buttons.Add(new ToolbarButtons.Cut()); TopToolbar.Buttons.Add(new ToolbarButtons.Copy()); TopToolbar.Buttons.Add(new ToolbarButtons.Paste()); TopToolbar.Buttons.Add(new ToolbarButtons.PasteText()); TopToolbar.Buttons.Add(new ToolbarButtons.PasteWord()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); TopToolbar.Buttons.Add(new ToolbarButtons.DecreaseIndent()); TopToolbar.Buttons.Add(new ToolbarButtons.IncreaseIndent()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); TopToolbar.Buttons.Add(new ToolbarButtons.Paragraph()); TopToolbar.Buttons.Add(new ToolbarButtons.JustifyLeft()); TopToolbar.Buttons.Add(new ToolbarButtons.JustifyCenter()); TopToolbar.Buttons.Add(new ToolbarButtons.JustifyRight()); TopToolbar.Buttons.Add(new ToolbarButtons.JustifyFull()); TopToolbar.Buttons.Add(new ToolbarButtons.RemoveAlignment()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); TopToolbar.Buttons.Add(new ToolbarButtons.OrderedList()); TopToolbar.Buttons.Add(new ToolbarButtons.BulletedList()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); TopToolbar.Buttons.Add(new ToolbarButtons.InsertHR()); TopToolbar.Buttons.Add(new ToolbarButtons.InsertLink()); TopToolbar.Buttons.Add(new ToolbarButtons.RemoveLink()); }
protected virtual void FillTopToolbar() { Collection<SelectOption> options; SelectOption option; TopToolbar.Buttons.Add(new ToolbarButtons.Undo()); TopToolbar.Buttons.Add(new ToolbarButtons.Redo()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); TopToolbar.Buttons.Add(new ToolbarButtons.Bold()); TopToolbar.Buttons.Add(new ToolbarButtons.Italic()); TopToolbar.Buttons.Add(new ToolbarButtons.Underline()); TopToolbar.Buttons.Add(new ToolbarButtons.StrikeThrough()); TopToolbar.Buttons.Add(new ToolbarButtons.SubScript()); TopToolbar.Buttons.Add(new ToolbarButtons.SuperScript()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); TopToolbar.Buttons.Add(new ToolbarButtons.Ltr()); TopToolbar.Buttons.Add(new ToolbarButtons.Rtl()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); var FixedForeColor = new ToolbarButtons.FixedForeColor(); TopToolbar.Buttons.Add(FixedForeColor); var ForeColorSelector = new ToolbarButtons.ForeColorSelector(); ForeColorSelector.FixedColorButtonId = FixedForeColor.ID = "FixedForeColor"; TopToolbar.Buttons.Add(ForeColorSelector); TopToolbar.Buttons.Add(new ToolbarButtons.ForeColorClear()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); var FixedBackColor = new ToolbarButtons.FixedBackColor(); TopToolbar.Buttons.Add(FixedBackColor); var BackColorSelector = new ToolbarButtons.BackColorSelector(); BackColorSelector.FixedColorButtonId = FixedBackColor.ID = "FixedBackColor"; TopToolbar.Buttons.Add(BackColorSelector); TopToolbar.Buttons.Add(new ToolbarButtons.BackColorClear()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); TopToolbar.Buttons.Add(new ToolbarButtons.RemoveStyles()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); var fontName = new FontName(); TopToolbar.Buttons.Add(fontName); options = fontName.Options; option = new SelectOption { Text = "Arial", Value = "arial,helvetica,sans-serif" }; options.Add(option); option = new SelectOption { Text = "Courier New", Value = "courier new,courier,monospace" }; options.Add(option); option = new SelectOption { Text = "Georgia", Value = "georgia,times new roman,times,serif" }; options.Add(option); option = new SelectOption { Text = "Tahoma", Value = "tahoma,arial,helvetica,sans-serif" }; options.Add(option); option = new SelectOption { Text = "Times New Roman", Value = "times new roman,times,serif" }; options.Add(option); option = new SelectOption { Text = "Verdana", Value = "verdana,arial,helvetica,sans-serif" }; options.Add(option); option = new SelectOption { Text = "Impact", Value = "impact" }; options.Add(option); option = new SelectOption { Text = "WingDings", Value = "wingdings" }; options.Add(option); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); var fontSize = new ToolbarButtons.FontSize(); TopToolbar.Buttons.Add(fontSize); options = fontSize.Options; option = new SelectOption { Text = "1 ( 8 pt)", Value = "8pt" }; options.Add(option); option = new SelectOption { Text = "2 (10 pt)", Value = "10pt" }; options.Add(option); option = new SelectOption { Text = "3 (12 pt)", Value = "12pt" }; options.Add(option); option = new SelectOption { Text = "4 (14 pt)", Value = "14pt" }; options.Add(option); option = new SelectOption { Text = "5 (18 pt)", Value = "18pt" }; options.Add(option); option = new SelectOption { Text = "6 (24 pt)", Value = "24pt" }; options.Add(option); option = new SelectOption { Text = "7 (36 pt)", Value = "36pt" }; options.Add(option); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); TopToolbar.Buttons.Add(new ToolbarButtons.Cut()); TopToolbar.Buttons.Add(new ToolbarButtons.Copy()); TopToolbar.Buttons.Add(new ToolbarButtons.Paste()); TopToolbar.Buttons.Add(new ToolbarButtons.PasteText()); TopToolbar.Buttons.Add(new ToolbarButtons.PasteWord()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); TopToolbar.Buttons.Add(new ToolbarButtons.DecreaseIndent()); TopToolbar.Buttons.Add(new ToolbarButtons.IncreaseIndent()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); TopToolbar.Buttons.Add(new ToolbarButtons.Paragraph()); TopToolbar.Buttons.Add(new ToolbarButtons.JustifyLeft()); TopToolbar.Buttons.Add(new ToolbarButtons.JustifyCenter()); TopToolbar.Buttons.Add(new ToolbarButtons.JustifyRight()); TopToolbar.Buttons.Add(new ToolbarButtons.JustifyFull()); TopToolbar.Buttons.Add(new ToolbarButtons.RemoveAlignment()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); TopToolbar.Buttons.Add(new ToolbarButtons.OrderedList()); TopToolbar.Buttons.Add(new ToolbarButtons.BulletedList()); TopToolbar.Buttons.Add(new ToolbarButtons.HorizontalSeparator()); TopToolbar.Buttons.Add(new ToolbarButtons.InsertHR()); TopToolbar.Buttons.Add(new ToolbarButtons.InsertLink()); TopToolbar.Buttons.Add(new ToolbarButtons.RemoveLink()); }