private void InitSplitter()
        {
            var meta     = m_TableSource.GetMetaData();
            int colCount = meta.GetColumnCount();

            m_ColumnState = new Filter.ColumnState[colCount];
            int[] colSizes = new int[colCount];

            string basePrefKey = k_DisplayWidthPrefKeyBase /*+ DisplayTable.GetName()*/;

            m_DisplayWidthPrefKeysPerColumn = new string[colCount];
            for (int i = 0; i != colCount; ++i)
            {
                var column = meta.GetColumnByIndex(i);
                m_DisplayWidthPrefKeysPerColumn[i] = basePrefKey + column.Name;
                colSizes[i]      = GetDisplayWidth(i, column.DefaultDisplayWidth);
                m_ColumnState[i] = new Filter.ColumnState();
            }
            m_Splitter = new SplitterStateEx(colSizes);
            m_Splitter.RealSizeChanged += SetDisplayWidth;
        }
Esempio n. 2
0
 public SpreadsheetLogic(SplitterStateEx splitter, IViewEventListener listener)
 {
     m_Splitter = splitter;
     m_Listener = new WeakReference(listener);
 }
 public TextSpreadsheet(SplitterStateEx splitter, IViewEventListener listener)
     : base(splitter, listener)
 {
 }