Exemplo n.º 1
0
        public override void GetCaretPosition(IGraphics gr, int x, int y, SelectionPoint sp, ref CaretPositionInfo cpi)
        {
            startTag.GetCaretPosition(gr, x, y, sp, ref cpi);
            if (cpi.IsFinal)
            {
                return;
            }

            int pos = x + startTag.Width;

            foreach (TableCell cell in cells)
            {
                cell.GetCaretPosition(gr, pos, y, sp, ref cpi);
                if (cpi.IsFinal)
                {
                    return;
                }

                int cellWidth = ParentTable[cell.ElementNode].Column.Width;
                pos += cellWidth;
            }

            endTag.GetCaretPosition(gr, pos, y, sp, ref cpi);
            if (cpi.IsFinal)
            {
                return;
            }
        }