private void AddLabelInNewRow(FormBuilderField field)
        {
            this.rowIndex++;
            this.MainLayout.RowCount++;
            this.MainLayout.RowStyles.Add(new RowStyle());
            this.MainLayout.RowStyles[this.MainLayout.RowCount - 1] = new RowStyle(SizeType.Absolute, 40F);

            Label label = new Label
            {
                Text = field.Name + @":",
                Font = new Font("Arial", 12F, FontStyle.Regular, GraphicsUnit.Point, 177),
                TextAlign = ContentAlignment.MiddleLeft,
                Dock = DockStyle.Fill,
                AutoSize = true
            };

            this.MainLayout.Controls.Add(label, 0, this.rowIndex);
        }
        private ComboBox CreateLabelAndComboBox(FormBuilderField field)
        {
            this.AddLabelInNewRow(field);

            ComboBox comboBox = new ComboBox
            {
                Anchor = AnchorStyles.Left | AnchorStyles.Right,
                Font = new Font("Arial", 9.75F, FontStyle.Regular, GraphicsUnit.Point, 177),
                FormattingEnabled = true,
                DropDownStyle = ComboBoxStyle.DropDownList,
                Enabled = !field.Readonly
            };
            return comboBox;
        }
예제 #3
0
 public void AddOrUpdateField(FormBuilderField field)
 {
     this.fieldsDictionary[field.Name] = field;
 }