Example #1
0
        /// <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);
        }
Example #2
0
        /// <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);
            }
        }
Example #3
0
 public ListGroupEventArgs(ListGroup ListGroup)
 {
 }
Example #4
0
 public ListGroupColumnCollection(ListGroup Owner)
     : base(Owner)
 {
     _Owner = Owner;
 }
Example #5
0
 public ListGroupItemCollection(ListGroup Owner)
     : base(Owner)
 {
     _Owner = Owner;
 }