/// <include file='doc\BordersPage.uex' path='docs/doc[@for="BordersPage.InitForm"]/*' /> /// <devdoc> /// Creates the UI of the page. /// </devdoc> private void InitForm() { GroupLabel cellMarginGroup = new GroupLabel(); Label cellPaddingLabel = new Label(); this.cellPaddingEdit = new NumberEdit(); Label cellSpacingLabel = new Label(); this.cellSpacingEdit = new NumberEdit(); GroupLabel borderLinesGroup = new GroupLabel(); Label gridLinesLabel = new Label(); this.gridLinesCombo = new ComboBox(); Label colorLabel = new Label(); this.borderColorCombo = new ColorComboBox(); this.borderColorPickerButton = new Button(); Label borderWidthLabel = new Label(); this.borderWidthUnit = new UnitControl(); cellMarginGroup.SetBounds(4, 4, 300, 16); cellMarginGroup.Text = SR.GetString(SR.BDLBor_CellMarginsGroup); cellMarginGroup.TabStop = false; cellMarginGroup.TabIndex = 0; cellPaddingLabel.Text = SR.GetString(SR.BDLBor_CellPadding); cellPaddingLabel.SetBounds(12, 24, 120, 14); cellPaddingLabel.TabStop = false; cellPaddingLabel.TabIndex = 1; cellPaddingEdit.SetBounds(12, 40, 70, 20); cellPaddingEdit.AllowDecimal = false; cellPaddingEdit.AllowNegative = false; cellPaddingEdit.TabIndex = 2; cellPaddingEdit.TextChanged += new EventHandler(this.OnBordersChanged); cellSpacingLabel.Text = SR.GetString(SR.BDLBor_CellSpacing); cellSpacingLabel.SetBounds(160, 24, 120, 14); cellSpacingLabel.TabStop = false; cellSpacingLabel.TabIndex = 3; cellSpacingEdit.SetBounds(160, 40, 70, 20); cellSpacingEdit.AllowDecimal = false; cellSpacingEdit.AllowNegative = false; cellSpacingEdit.TabIndex = 4; cellSpacingEdit.TextChanged += new EventHandler(this.OnBordersChanged); borderLinesGroup.SetBounds(4, 70, 300, 16); borderLinesGroup.Text = SR.GetString(SR.BDLBor_BorderLinesGroup); borderLinesGroup.TabStop = false; borderLinesGroup.TabIndex = 5; gridLinesLabel.Text = SR.GetString(SR.BDLBor_GridLines); gridLinesLabel.SetBounds(12, 90, 150, 14); gridLinesLabel.TabStop = false; gridLinesLabel.TabIndex = 6; gridLinesCombo.SetBounds(12, 106, 140, 21); gridLinesCombo.DropDownStyle = ComboBoxStyle.DropDownList; gridLinesCombo.Items.Clear(); gridLinesCombo.Items.AddRange(new object[] { SR.GetString(SR.BDLBor_GL_Horz), SR.GetString(SR.BDLBor_GL_Vert), SR.GetString(SR.BDLBor_GL_Both), SR.GetString(SR.BDLBor_GL_None) }); gridLinesCombo.TabIndex = 7; gridLinesCombo.SelectedIndexChanged += new EventHandler(this.OnBordersChanged); colorLabel.Text = SR.GetString(SR.BDLBor_BorderColor); colorLabel.SetBounds(12, 134, 150, 14); colorLabel.TabStop = false; colorLabel.TabIndex = 8; borderColorCombo.SetBounds(12, 150, 140, 21); borderColorCombo.TabIndex = 9; borderColorCombo.TextChanged += new EventHandler(this.OnBordersChanged); borderColorCombo.SelectedIndexChanged += new EventHandler(this.OnBordersChanged); borderColorPickerButton.SetBounds(156, 149, 24, 22); borderColorPickerButton.Text = "..."; borderColorPickerButton.TabIndex = 10; borderColorPickerButton.FlatStyle = FlatStyle.System; borderColorPickerButton.Click += new EventHandler(this.OnClickColorPicker); borderWidthLabel.Text = SR.GetString(SR.BDLBor_BorderWidth); borderWidthLabel.SetBounds(12, 178, 150, 14); borderWidthLabel.TabStop = false; borderWidthLabel.TabIndex = 11; borderWidthUnit.SetBounds(12, 194, 102, 22); borderWidthUnit.AllowNegativeValues = false; borderWidthUnit.AllowPercentValues = false; borderWidthUnit.DefaultUnit = UnitControl.UNIT_PX; borderWidthUnit.TabIndex = 12; borderWidthUnit.Changed += new EventHandler(OnBordersChanged); this.Text = SR.GetString(SR.BDLBor_Text); this.Size = new Size(308, 156); this.CommitOnDeactivate = true; this.Icon = new Icon(this.GetType(), "BordersPage.ico"); this.Controls.Clear(); this.Controls.AddRange(new Control[] { borderWidthUnit, borderWidthLabel, borderColorPickerButton, borderColorCombo, colorLabel, gridLinesCombo, gridLinesLabel, borderLinesGroup, cellSpacingEdit, cellSpacingLabel, cellPaddingEdit, cellPaddingLabel, cellMarginGroup }); }