Click here to Skip to main content
14,392,909 members
Rate this:
Please Sign up or sign in to vote.
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 10: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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100