Beispiel #1
0
        private void loadControl(string html)
        {
            if (tableLayoutPanel1.Controls.Contains(_editor))
                tableLayoutPanel1.Controls.Remove(_editor);

            _editor = new Editor(html)
            {
                BackColor = System.Drawing.SystemColors.Control,
                BodyHtml = null,
                BodyText = null,
                Dock = DockStyle.Fill,
                DocumentText = html,
                EditorBackColor = System.Drawing.Color.FromArgb(255, 255, 255),
                EditorForeColor = System.Drawing.Color.FromArgb(0, 0, 0),
                FontSize = FontSize.Three,
                Location = new System.Drawing.Point(0, 24),
                Name = "editor",
                Size = new System.Drawing.Size(588, 386),
                TabIndex = 1
            };
            tableLayoutPanel1.Controls.Add(_editor, 0, 1);
        }
Beispiel #2
0
        private Editor getEditorControl()
        {
            if(_editor == null)
            {
                _editor = new Editor("<HTML></HTML>")
                {
                    BackColor = System.Drawing.SystemColors.Control,
                    BodyHtml = null,
                    BodyText = null,
                    Dock = DockStyle.Fill,
                    EditorBackColor = System.Drawing.Color.FromArgb(255, 255, 255),
                    EditorForeColor = System.Drawing.Color.FromArgb(0, 0, 0),
                    FontSize = FontSize.Three,
                    Location = new System.Drawing.Point(0, 24),
                    Name = "editor",
                    Size = new System.Drawing.Size(588, 386),
                    TabIndex = 1
                };
                tableLayoutPanel1.Controls.Add(_editor, 0, 1);
            }

            return _editor;
        }