}// createVariableLine
 private List<MatCellItems> getIndivsCells()
 {
     List<MatCellItems> cells = new List<MatCellItems>();
     if ((m_varcells == null) || (m_indivcells == null) || (m_datacells == null))
     {
         return cells;
     }
     var ff = createIndivsLine();
     if (ff != null)
     {
         cells.Add(ff);
     }
     if (m_defaultitem == null)
     {
         MatCellItem tt = new MatCellItem();
         tt.TotalHeight = this.MatItemHeight;
         tt.TotalWidth = this.MatItemWidth;
         m_defaultitem = tt;
     }
     int[] colindex = this.ColIndex;
     int[] rowindex = this.RowIndex;
     double[,] xdata = this.InitialData;
     int nr = xdata.GetLength(0);
     int nv = xdata.GetLength(1);
     if ((nr > 0) && (nv > 0) && (colindex.Length >= nv) && (rowindex.Length >= nr))
     {
         int width = this.MatItemWidth;
         if (width < 10)
         {
             width = 10;
         }
         MatDisplayMode mode = this.MatriceDisplayMode;
         MatCellItems cur = new MatCellItems();
         cur.Add(m_defaultitem);
         for (int i = 0; i < nv; ++i)
         {
             int icol = colindex[i];
             MatCellItem item = m_varcells[icol];
             item.CellType = MatItemType.typeVar;
             item.TotalWidth = width;
             cur.Add(item);
         }// i
         cells.Add(cur);
         //
         for (int i = 0; i < nr; ++i)
         {
             MatCellItems line = new MatCellItems();
             //
             int irow = rowindex[i];
             MatCellItem tx = m_indivcells[irow];
             tx.CellType = MatItemType.typeInd;
             tx.TotalWidth = width;
             line.Add(tx);
             //
             for (int j = 0; j < nv; ++j)
             {
                 int icol = colindex[j];
                 MatCellItem item = m_datacells[irow, icol];
                 item.DisplayMode = mode;
                 item.TotalWidth = width;
                 line.Add(item);
             }// j
             if (this.HasSummary && (m_refclasses != null))
             {
                 line.Add(m_defaultitem);
                 MatCellItem item = m_refclasses[irow];
                 item.TotalWidth = width;
                 line.Add(item);
             }
             //
             cells.Add(line);
         }// i
     }// nr && nv
     return cells;
 }// getIndivCells
 }// createIndivLine
 private MatCellItems createVariableLine()
 {
     if (m_defaultitem == null)
     {
         MatCellItem tt = new MatCellItem();
         tt.TotalHeight = this.MatItemHeight;
         tt.TotalWidth = this.MatItemWidth;
         m_defaultitem = tt;
     }
     double[,] xdata = this.InitialData;
     int nr = xdata.GetLength(0);
     if (nr < 1)
     {
         return null;
     }
     var line = new MatCellItems();
     MatCellItem tx = m_defaultitem;
     line.Add(tx);
     //
     for (int j = 0; j < nr; ++j)
     {
         line.Add(tx);
     }// j
     //
     return line;
 }// createVariableLine
 private void myChangeData()
 {
     m_colcells = null;
     m_rowcells = null;
     m_refclasses = null;
     double[,] data = this.InitialData;
     int width = this.MatItemWidth;
     int height = this.MatItemHeight;
     String[] varnames = this.VarNames.ToArray();
     String[] indnames = this.IndNames.ToArray();
     int nr = data.GetLength(0);
     int nv = data.GetLength(1);
     int[] colindex = new int[nv];
     m_varcells = new MatCellItem[nv];
     m_datacells = new MatCellItem[nr, nv];
     for (int i = 0; i < nv; ++i)
     {
         colindex[i] = i;
         MatCellItem t = new MatCellItem();
         t.Text = varnames[i];
         t.TotalHeight = height;
         t.TotalWidth = width;
         m_varcells[i] = t;
         for (int j = 0; j < nr; ++j)
         {
             MatCellItem tt = new MatCellItem();
             tt.TotalHeight = height;
             tt.TotalWidth = width;
             tt.CellType = MatItemType.typeValInf;
             m_datacells[j, i] = tt;
         }// j
     }// i
     this.ColIndex = colindex;
     int[] rowindex = new int[nr];
     m_indivcells = new MatCellItem[nr];
     m_refclasses = new MatCellItem[nr];
     for (int i = 0; i < nr; ++i)
     {
         rowindex[i] = i;
         MatCellItem t = new MatCellItem();
         t.Text = indnames[i];
         t.TotalHeight = height;
         t.TotalWidth = width;
         m_indivcells[i] = t;
         MatCellItem tt = new MatCellItem();
         tt.CellType = MatItemType.typeSummary;
         tt.TotalHeight = height;
         tt.TotalWidth = width;
         m_refclasses[i] = tt;
     }// i
     this.RowIndex = rowindex;
     this.myChangeClasses();
 }// myChangeData
 }// getVariablesCells
 private MatCellItems createIndivsLine()
 {
     if (m_defaultitem == null)
     {
         MatCellItem tt = new MatCellItem();
         tt.TotalHeight = this.MatItemHeight;
         tt.TotalWidth = this.MatItemWidth;
         m_defaultitem = tt;
     }
     double[,] xdata = this.InitialData;
     int nv = xdata.GetLength(1);
     if (nv < 1)
     {
         return null;
     }
     var line = new MatCellItems();
     MatCellItem tx = m_defaultitem;
     line.Add(tx);
     //
     for (int j = 0; j < nv; ++j)
     {
         line.Add(tx);
     }// j
     if (this.HasSummary && (m_refclasses != null))
     {
         line.Add(tx);
     }
     //
     return line;
 }// createIndivLine
 public MatriceUserControl()
 {
     m_busy = true;
     m_ordmodelview = null;
     m_indivs = null;
     m_colcells = null;
     m_rowcells = null;
     m_refclasses = null;
     m_cts = null;
     m_varcells = null;
     m_indivcells = null;
     m_datacells = null;
     m_defaultitem = null;
     InitializeComponent();
     m_busy = false;
 }