public Panel Panel() { ActiveControl = SearchTextBox; SearchTextBox.Select(); SearchTextBox.Focus(); return(CustomerFormPanel); }
private void ChangeEditingStatus() { _product = new Product(); ClearProductInputBoxes(); SaveButton.Visible = IsEditing; AddingRadioButton.Visible = IsEditing; EditingRadioButton.Visible = !IsEditing; AddProductButton.Visible = !IsEditing; SearchLabel.Visible = IsEditing; SearchTextBox.Visible = IsEditing; if (IsEditing) // -----when editing---- { ProductsGridView.Visible = true; SearchTextBox.Select(); AcceptButton = SaveButton; AddingRadioButton.Checked = false; } else // ----when adding---- { ProductsGridView.Visible = false; ProductNameTextBox.Select(); AcceptButton = AddProductButton; AddingRadioButton.Checked = true; } }
private void SearchTab_Enter(object sender, EventArgs e) { SearchTextBox.Select(); SearchTextBox.Clear(); }