protected void AddBrowser() { _browser = new MshtmlEdit(); _browser.Dock = DockStyle.Fill; _browser.add_KeyDown(OnKeyDown); _panelBrowser.Controls.Add(_browser); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponentSelf() { _txtTitle = new JetTextBox(); _toolbar = new RichEditToolbar(); _htmled = new MshtmlEdit(); Closing += new CancelEventHandler(OnBeforeCloseForm); SuspendLayout(); // // _txtTitle // _txtTitle.Location = new Point(36, 100); _txtTitle.Name = "_txtTitle"; _txtTitle.TabIndex = 1; _txtTitle.Text = ""; _txtTitle.Dock = DockStyle.Top; _txtTitle.TextChanged += new EventHandler(OnTitleChanged); _txtTitle.KeyDown += new KeyEventHandler(OnEditorKeyDown); // // _htmled // _htmled.Name = "_htmled"; _htmled.TabIndex = 2; _htmled.Dock = DockStyle.Fill; _htmled.add_KeyDown(new KeyEventHandler(OnEditorKeyDown)); // // _toolbar // // _toolbar.DropDownArrows = true; _toolbar.Location = new Point(0, 0); _toolbar.Name = "_toolbar"; _toolbar.TabStop = true; _toolbar.TabIndex = 3; // // _panelBody // _panelBody = new Panel(); _panelBody.BorderStyle = BorderStyle.Fixed3D; _panelBody.Controls.Add(_htmled); _panelBody.Dock = DockStyle.Fill; _panelBody.Name = "_panelBody"; _panelBody.TabIndex = 2; // // BlogExtensionComposer // AutoScaleBaseSize = new Size(5, 13); ClientSize = new Size(800, 600); Controls.Add(_panelBody); Controls.Add(_txtTitle); Controls.Add(_toolbar); Name = "BlogExtensionComposer"; Text = "Compose a Blog Entry"; ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponentSelf() { _subject = new Label(); _txtTitle = new JetTextBox(); // _toolbar = new RichEditToolbarFull(); _toolbar = new RichEditToolbar(); _htmled = new MshtmlEdit(); _panelSubject = new Panel(); _panelBody = new Panel(); _panelCategories = new Panel(); _selector = new CategoriesSelector(); SuspendLayout(); // // _panelSubject // _panelSubject.Location = new Point(0, 0); _panelSubject.Size = new Size(800, 30); _panelSubject.Controls.Add(_subject); _panelSubject.Controls.Add(_txtTitle); _panelSubject.Dock = DockStyle.Top; // // _subject // _subject.Location = new Point(4, 7); _subject.Name = "_subject"; _subject.TabStop = false; _subject.Text = "&Subject:"; _subject.Size = new Size(65, 25); // // _txtTitle // _txtTitle.Location = new Point(80, 4); _txtTitle.Size = new Size(700, 25); _txtTitle.Name = "_txtTitle"; _txtTitle.TabStop = false; _txtTitle.Text = ""; _txtTitle.TextChanged += OnTitleChanged; _txtTitle.KeyDown += OnEditorKeyDown; // // _htmled // _htmled.Name = "_htmled"; _htmled.TabIndex = 1; _htmled.Dock = DockStyle.Fill; _htmled.add_KeyDown(new KeyEventHandler(OnEditorKeyDown)); _htmled.add_PropertyChanged(new EventHandler(OnPropChanged)); _htmled.add_PasteHandler(new EventHandler(OnPropChanged)); // // _toolbar // // _toolbar.DropDownArrows = true; _toolbar.Location = new Point(36, 0); _toolbar.Name = "_toolbar"; _toolbar.TabStop = false; _toolbar.Dock = DockStyle.Top; // // _panelBody // _panelBody.BorderStyle = BorderStyle.Fixed3D; _panelBody.Controls.Add(_htmled); _panelBody.Controls.Add(_toolbar); _panelBody.Dock = DockStyle.Fill; _panelBody.Name = "_panelBody"; _panelBody.TabIndex = 1; // // _panelCategories // _panelCategories.Controls.Add(_selector); _panelCategories.BorderStyle = BorderStyle.Fixed3D; _panelCategories.Size = new Size(800, 40); _panelCategories.Dock = DockStyle.Bottom; _panelCategories.Name = "_panelCategories"; _panelCategories.TabIndex = 2; // // _selector // _selector.Dock = DockStyle.Fill; _selector.Location = new Point(0, 0); _selector.Name = "_selector"; _selector.Size = new Size(320, 40); _selector.TabIndex = 3; // // NoteComposer // ClientSize = new Size(800, 600); Controls.Add(_panelBody); Controls.Add(_panelCategories); Controls.Add(_panelSubject); ParentChanged += NoteEditor_ParentChanged; Name = "NoteComposer"; Text = "Edit a Note"; ResumeLayout(false); }