ZForge.Controls.ExplorerBar.Expando.ProcessTabKey C# (CSharp) Method

ProcessTabKey() protected method

Selects the next available control and makes it the active control
protected ProcessTabKey ( bool forward ) : bool
forward bool true to cycle forward through the controls in /// the Expando; otherwise, false
return bool
        protected virtual bool ProcessTabKey(bool forward)
        {
            if (forward)
            {
                if ((this.Focused && !this.Collapsed) || this.Items.Count == 0)
                {
                    return base.SelectNextControl(this, forward, true, true, false);
                }
                else
                {
                    return this.Parent.SelectNextControl(this.Items[this.Items.Count-1], forward, true, true, false);
                }
            }
            else
            {
                if (this.Focused || this.Items.Count == 0 || this.Collapsed)
                {
                    return this.Parent.SelectNextControl(this, forward, true, true, false);
                }
                else
                {
                    this.Select();

                    return this.Focused;
                }
            }
        }