Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

RTF Document Constructor Library

, 16 Aug 2010
Create Rich Text Format documents programatically.
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;

namespace ESCommon.Rtf
{
    /// <summary>
    /// Represents a collection of cell definitions in a ESCommon.Rtf.RtfTableRow
    /// </summary>
    public class RtfTableCellDefinitionCollection : IEnumerable<RtfTableCellDefinition>
    {
        private RtfTableRow Row;
        private List<RtfTableCellDefinition> list;

        /// <summary>
        /// Gets ESCommon.Rtf.RtfTableCellDefinition at specified location.
        /// </summary>
        /// <param name="index">A zero-based index of ESCommon.Rtf.RtfTableCellDefinition to get.</param>
        public RtfTableCellDefinition this[int index]
        {
            get { return list[index]; }
        }

        /// <summary>
        /// Gets the number of cell definitions in the collection.
        /// </summary>
        public int Count
        {
            get { return list.Count; }
        }


        /// <summary>
        /// Initializes a new instance of ESCommon.Rtf.RtfTableCellDefinitionCollection class.
        /// </summary>
        /// <param name="row">Owning row.</param>
        internal RtfTableCellDefinitionCollection(RtfTableRow row)
        {
            list = new List<RtfTableCellDefinition>();
            Row = row;
        }


        /// <summary>
        /// Adds the specified ESCommon.Rtf.RtfTableCellDefinition to the collection.
        /// </summary>
        internal void AddInternal(RtfTableCellDefinition rtfTableCellDefinition)
        {
            list.Add(rtfTableCellDefinition);
        }


        IEnumerator<RtfTableCellDefinition> IEnumerable<RtfTableCellDefinition>.GetEnumerator()
        {
            return list.GetEnumerator();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return list.GetEnumerator();
        }

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Dima Popov
Software Developer Energoservice
Russian Federation Russian Federation
Dmitry lives in Arkhangelsk, Russia. He has developed C# applications since 2007.

| Advertise | Privacy | Mobile
Web04 | 2.8.140922.1 | Last Updated 16 Aug 2010
Article Copyright 2010 by Dima Popov
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid