private void fieldEditorResize(object sender, EventArgs e) { if (editorProvider == null) { return; } editorProvider.resizeToWidth(getWidgetWidth()); editorProvider.resizeToHeight(getWidgetHeight()); }
private void addEditorWidget(JiraFieldEditorProvider editor) { PlvsLogger.log("FieldEditor.addEditorWidget()"); Controls.Remove(labelInfo); editorControl = editor.Widget; editorControl.Location = new Point(MARGIN, MARGIN); Controls.Add(editorControl); editor.resizeToWidth(Width); ClientSize = new Size(editorControl.Width + 2 * MARGIN, editorControl.Height + 2 * MARGIN + (ClientSize.Height - buttonOk.Location.Y)); Resize += fieldEditorResize; if (customWidth != -1 && customHeight != -1) { Size = new Size(customWidth, customHeight); } }