/// <include file='doc\ComponentEditorForm.uex' path='docs/doc[@for="ComponentEditorForm.OnNewObjects"]/*' /> /// <devdoc> /// Called to initialize this form with the new component. /// </devdoc> /// <internalonly/> private void OnNewObjects() { pageSites = null; maxSize = new Size(3 * (BUTTON_WIDTH + BUTTON_PAD), 24 * pageTypes.Length); pageSites = new ComponentEditorPageSite[pageTypes.Length]; // create sites for them // for (int n = 0; n < pageTypes.Length; n++) { pageSites[n] = new ComponentEditorPageSite(pageHost, pageTypes[n], component, this); ComponentEditorPage page = pageSites[n].GetPageControl(); Size pageSize = page.Size; if (pageSize.Width > maxSize.Width) { maxSize.Width = pageSize.Width; } if (pageSize.Height > maxSize.Height) { maxSize.Height = pageSize.Height; } } // and set them all to an ideal size // for (int n = 0; n < pageSites.Length; n++) { pageSites[n].GetPageControl().Size = maxSize; } }
/// <include file='doc\ComponentEditorForm.uex' path='docs/doc[@for="ComponentEditorForm.OnNewObjects"]/*' /> /// <devdoc> /// Called to initialize this form with the new component. /// </devdoc> /// <internalonly/> private void OnNewObjects() { pageSites = null; maxSize = new Size(3 * (BUTTON_WIDTH + BUTTON_PAD), 24 * pageTypes.Length); pageSites = new ComponentEditorPageSite[pageTypes.Length]; // create sites for them // for (int n = 0; n < pageTypes.Length; n++) { pageSites[n] = new ComponentEditorPageSite(pageHost, pageTypes[n], component, this); ComponentEditorPage page = pageSites[n].GetPageControl(); Size pageSize = page.Size; if (pageSize.Width > maxSize.Width) maxSize.Width = pageSize.Width; if (pageSize.Height > maxSize.Height) maxSize.Height = pageSize.Height; } // and set them all to an ideal size // for (int n = 0; n < pageSites.Length; n++) { pageSites[n].GetPageControl().Size = maxSize; } }