Exemplo n.º 1
0
        /// ///////////////////////////////////////
        public override bool AddChild(I2iObjetGraphique child)
        {
            if (child is C2iWndDataGridColumn)
            {
                return(base.AddChild(child));
            }
            else
            {
                C2iWnd wnd = child as C2iWnd;
                if (wnd != null)
                {
                    if (wnd is IWndIncluableDansDataGrid)
                    {
                        wnd.AutoBackColor = false;
                        C2iWndDataGridColumn col = new C2iWndDataGridColumn();
                        col.Text = "col " + (Childs.Count() + 1);

                        col.Control = wnd;
                        base.AddChild(col);
                        col.ForeColor = DefaultColumnHeaderForeColor;
                        col.BackColor = DefaultColumnHeaderBackColor;
                        col.Parent    = this;
                        return(true);
                    }
                }
            }
            return(false);
        }
Exemplo n.º 2
0
        /// ///////////////////////////////////////
        public C2iWndDataGridColumn GetColumn(int nIndex)
        {
            int nCpt = 0;

            foreach (I2iObjetGraphique objet in Childs)
            {
                C2iWndDataGridColumn col = objet as C2iWndDataGridColumn;
                if (col != null)
                {
                    if (nCpt == nIndex)
                    {
                        return(col);
                    }
                    nCpt++;
                }
            }
            return(null);
        }