PropertyGrid.PropertyGrid.toolbarClick C# (CSharp) Method

toolbarClick() private method

private toolbarClick ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        void toolbarClick(object sender, EventArgs e)
        {
            if (sender == alphButton)
                PropertySort = PropertySort.Alphabetical;
            else if (sender == catButton)
                PropertySort = PropertySort.Categorized;
            else {
                TabRadioToolButton button = (TabRadioToolButton) sender;
                if (selectedTab == button.Tab) return;
                selectedTab = button.Tab;
                Populate ();
            }
            // If the tree is re-populated while a value is being edited, the focus that the value editor had
            // is not returned back to the tree. We need to explicitly get it.
            tree.GrabFocus ();
        }