Ejemplo n.º 1
0
        private void flex_ChangeEdit(object sender, System.EventArgs e)
        {
            using (Graphics g = flex.CreateGraphics())
            {
                // measure text height
                StringFormat sf   = new StringFormat();
                int          wid  = flex.Cols[flex.Col].WidthDisplay - 2;
                string       text = flex.Editor.Text;
                SizeF        sz   = g.MeasureString(text, flex.Font, wid, sf);

                // adjust row height if necessary
                C1.Win.C1FlexGrid.Row row = flex.Rows[flex.Row];
                if (sz.Height + 4 > row.HeightDisplay)
                {
                    row.HeightDisplay = (int)sz.Height + 4;
                }
            }
        }