private void simpleButtonOK_Click(object sender, EventArgs e) { //单元格边框 m_Cell.BorderWidthTop = Convert.ToInt32(comboBoxBorderTop.SelectedValue); m_Cell.BorderWidthRight = Convert.ToInt32(comboBoxBorderRight.SelectedValue); m_Cell.BorderWidthBottom = Convert.ToInt32(comboBoxBorderBottom.SelectedValue); m_Cell.BorderWidthLeft = Convert.ToInt32(comboBoxBorderLeft.SelectedValue); //单元格边距 int paddingTop = Convert.ToInt32(spinEditSpaceTop.EditValue); int paddingRight = Convert.ToInt32(spinEditSpaceRight.EditValue); int paddingBottom = Convert.ToInt32(spinEditSpaceBottom.EditValue); int paddingLeft = Convert.ToInt32(spinEditSpaceLeft.EditValue); foreach (TPTextCell cell in m_Cell.OwnerRow.Cells) { if (!cell.Merged) { cell.PaddingTop = paddingTop; cell.PaddingRight = paddingRight; cell.PaddingBottom = paddingBottom; cell.PaddingLeft = paddingLeft; } } p_cell = m_Cell; //重新计算界面中元素的位置,然后重绘界面中的元素 m_Cell.OwnerDocument.Refresh2(); this.Close(); }
public TableCellSetting(TPTextCell cell, TPTextCell oldcell) { InitializeComponent(); m_Cell = cell; o_Cell = oldcell; InitBorderComboBox(); InitBorderValue(); InitSpaceValue(); }
private void btn_CellBorderWidth_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { TPTextCell cell = this.zyEditorControl1.EMRDoc.GetCurrentCell(); if (cell != null) { if (m_cell == null) { m_cell = cell; } TableCellSetting cellSetting = new TableCellSetting(cell, m_cell); cellSetting.StartPosition = FormStartPosition.CenterScreen; DialogResult DialogResult = cellSetting.ShowDialog(); m_cell = cellSetting.p_cell; } } catch (Exception ex) { DrectSoft.Common.Ctrs.DLG.MyMessageBox.Show(1, ex.Message); } }
public TableProperty(TPTextTable table, TPTextCell cell) { InitializeComponent(); this.table = table; this.cell = cell; txtHeader.Text = this.table.Header; switch (this.table.HorizontalAlignment) { case 1: checkBox1_Click(null, null); break; case 2: checkBox2_Click(null, null); break; case 3: checkBox3_Click(null, null); break; } checkBoxTable.Checked = this.table.HiddenAllBorder; }