Inheritance: System.Windows.Forms.ListView
        /// <summary>
        /// Handles the ControlAdded Event for the current instance.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void GroupListControl_ControlAdded(object sender, ControlEventArgs e)
        {
            ListGroup lg = (ListGroup)e.Control;

            lg.Width           = this.Width;
            lg.GroupCollapsed += new ListGroup.GroupExpansionHandler(lg_GroupCollapsed);
            lg.GroupExpanded  += new ListGroup.GroupExpansionHandler(lg_GroupExpanded);
        }
        /// <summary>
        /// Handles the Expanded event for the current instance.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void lg_GroupExpanded(object sender, EventArgs e)
        {
            // Grab a reference to the ListGroup which sent the message:
            ListGroup expanded = (ListGroup)sender;

            // If Single item only expansion, collapse all ListGroups in except
            // the one currently exanding:
            if (this.SingleItemOnlyExpansion)
            {
                this.SuspendLayout();
                foreach (ListGroup lg in this.Controls)
                {
                    if (!lg.Equals(expanded))
                    {
                        lg.Collapse();
                    }
                }
                this.ResumeLayout(true);
            }
        }
 public ListGroupItemCollection(ListGroup Owner)
     : base(Owner)
 {
     _Owner = Owner;
 }
 public ListGroupColumnCollection(ListGroup Owner)
     : base(Owner)
 {
     _Owner = Owner;
 }
Esempio n. 5
0
 public ListGroupColumnCollection(ListGroup Owner) : base(Owner)
 {
     _Owner = Owner;
 }
Esempio n. 6
0
 public ListGroupItemCollection(ListGroup Owner) : base(Owner)
 {
     _Owner = Owner;
 }
 public ListGroupEventArgs(ListGroup ListGroup)
 {
 }
        private void Form1_Load(object sender, EventArgs e)
        {
            // Create a GroupedListControl instance:
            GroupListControl glc = this.groupListControl1;
            glc.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));

            // Add some sample columns:
            for(int i = 1; i <=5; i++)
            {
                ListGroup lg = new ListGroup();
                lg.Columns.Add("List Group " + i.ToString(), 120);
                lg.Columns.Add("Group " + i + " SubItem 1", 150);
                lg.Columns.Add("Group " + i + " Subitem 2", 150);
                lg.Name = "Group " + i;

                // Now add some sample items:
                for (int j = 1; j <= 5; j++)
                {
                    ListViewItem item = lg.Items.Add("Item " + j.ToString());
                    item.SubItems.Add(item.Text + " SubItem 1");
                    item.SubItems.Add(item.Text + " SubItem 2");
                }

                // Add handling for the columnRightClick Event:
                lg.ColumnRightClick += new ListGroup.ColumnRightClickHandler(lg_ColumnRightClick);
                lg.MouseClick += new MouseEventHandler(lg_MouseClick);

                glc.Controls.Add(lg);
            }
        }
Esempio n. 9
0
 public ListGroupEventArgs(ListGroup ListGroup)
 {
 }