-1
Good night! I am developing a system with customer registration and I am new to programming and I would like to know how to do so as soon as I open the form only the first tab remains open and when the user enters a client’s code, the other tabs for editing the same client return. I’ll leave the code I’m trying below, I can get the tabs to start closed, but they won’t return if I enter the client code. I really appreciate you guys helping me out!
private void tabClientes_Layout(object sender, LayoutEventArgs e)
{
if (txtCodigoCli.Text == "")
{
tabClientes.TabPages.Remove(tabAgendamento);
tabClientes.TabPages.Remove(tabInteracoes);
tabClientes.TabPages.Remove(tabVendas);
}
else
{
tabClientes.TabPages.Add(tabAgendamento);
}
tabClientes.Refresh();
}