コード例 #1
0
        public virtual ToggleColumnHeader Add(string str, int width, HorizontalAlignment textAlign)
        {
            ToggleColumnHeader tch = new ToggleColumnHeader();
            tch.Text = str;
            tch.Width = width;
            tch.TextAlign = textAlign;
            tch.WidthResized += new EventHandler(OnWidthResized);

            lock(List.SyncRoot)
            {
                tch.Index = List.Add(tch);
            }
            return tch;
        }
コード例 #2
0
        public object Clone()
        {
            ToggleColumnHeader ch = new ToggleColumnHeader();
            ch.Index = index;
            ch.Text = text;
            ch.TextAlign = textAlign;
            ch.Width = width;

            return ch;
        }
コード例 #3
0
 public ToggleColumnHeader this[int index]
 {
     get
     {
         ToggleColumnHeader tch = new ToggleColumnHeader();
         try
         {
             tch = List[index] as ToggleColumnHeader;
         }
         catch
         {
             Debug.WriteLine("Column at index " + index + " does not exist.");
         }
         return tch;
     }
     set
     {
         List[index] = value;
         ((ToggleColumnHeader)List[index]).WidthResized += new EventHandler(OnWidthResized);
     }
 }