Click here to Skip to main content
15,878,748 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have text-boxes and their texts are set by default to normal or none, the problem is that when I click on one text-box and then click on another text-box, all the other text-boxes default text will disappear.

You can check this picture to understand my problem:
Imgur: The magic of the Internet[^]
[^]

What I have tried:

The code where I set the text-boxes default text
private void AddButton_Click(object sender, EventArgs e)
   {

       objState = EntityState.Added;

       metroPanel2.Enabled = true;


       eRCPclassBindingSource.Add(new ERCPclass());
       eRCPclassBindingSource.MoveLast();


       PatientNamebox.Focus();
       PatientNamebox.Text = null;
       Agebox.Text = null;
       refbox.Text = null;
       MidazolamBox.Text = "None";
       PethidineBox.Text = "None";
       OtherDuruBox.Text = "None";
       PapillaBox.Text = "None";
       CholangiographyBox.Text = "Normal";
       PancreatographyBox.Text = "Normal";
       TherapeuticProceduresBox.Text = "Normal";
       ConclusionBox.Text = "Normal";
       RecommendationBox.Text = "Normal";
       pic.Image = null;
       pic1.Image = null;
       pic2.Image = null;
       pic3.Image = null;
       pic4.Image = null;
       pic5.Image = null;

       label24.Text = dgvERCPinfo.RowCount.ToString();

   }
Posted
Updated 22-Dec-18 9:47am
v3
Comments
RickZeeland 22-Dec-18 14:25pm    
Please provide more information / code, and tags like WPF, C# etc.
Ahmed Taha 22-Dec-18 14:40pm    
Windows Form Application
Ahmed Taha 23-Dec-18 15:13pm    
Any help ???

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900