Exemple #1
0
            public void ShowEditControl(Graphics.Rectangle bounds, Cell cell)
            {
                var rect = new WFRect((int)Math.Round(bounds.Left), (int)Math.Round(bounds.Top),
                                      (int)Math.Round(bounds.Width), (int)Math.Round(bounds.Height));

                editTextbox.SuspendLayout();
                editTextbox.Bounds      = rect;
                editTextbox.TextWrap    = cell.IsMergedCell || cell.InnerStyle.TextWrapMode != TextWrapMode.NoWrap;
                editTextbox.InitialSize = rect.Size;
                editTextbox.VAlign      = cell.InnerStyle.VAlign;
                editTextbox.Font        = cell.RenderFont;
                editTextbox.ForeColor   = cell.InnerStyle.TextColor;
                editTextbox.BackColor   = cell.InnerStyle.HasStyle(PlainStyleFlag.BackColor)
                                        ? cell.InnerStyle.BackColor : this.control.ControlStyle[ControlAppearanceColors.GridBackground];
                editTextbox.ResumeLayout();

                editTextbox.Visible = true;
                editTextbox.Focus();
            }