2012年11月29日 星期四

GlacialList.dll note

1. Add GlacialList.dll to project.
2. Drag the GlacialList.dll to toolbox.
3. Drag the GlacialList control to the window form.
4. Add reference to the code file
 using GlacialComponents.Controls;
5. Example code
 GlacialList mylist = new GlacialList();

            GLColumn column = this.glacialList1.Columns.Add("Column1", 100); // this can also be added 
            // through the design time support 
            GLColumn column1 = this.glacialList1.Columns.Add("Column2", 100);
            this.glacialList1.Columns.Add("Column3", 100);
            this.glacialList1.Columns.Add("Column4", 100);
           
            column.ActivatedEmbeddedType = GLActivatedEmbeddedTypes.ComboBox;
            column1.CheckBoxes=true;
            GLItem item;
             

            item = this.glacialList1.Items.Add("Atlanta Braves");
            //item.SubItems[0].
            item.SubItems[1].Text = "8v";
            item.SubItems[0].Tag = new string[] { "8v", "7v", "6v", "5v", "Atlanta Braves" };
            item.SubItems[2].Text = "Live";
            item.SubItems[2].BackColor = Color.Bisque;
            item.SubItems[3].Text = "MLB.TV";

            item = this.glacialList1.Items.Add("Florida Marlins");
            item.SubItems[1].Text = "";
            item.SubItems[2].Text = "Delayed";
            item.SubItems[2].BackColor = Color.LightCoral;
            item.SubItems[3].Text = "Audio";


            item.SubItems[1].BackColor = Color.Aqua; // set the background 
            // of this particular subitem ONLY
            //item.UserObject = myownuserobjecttype; // set a private user object
            item.Selected = true; // set this item to selected state

沒有留言: