Quantcast
Viewing all articles
Browse latest Browse all 12583

TAB control and custom user control naming

Hello, 

I will describe the things I did. 

I added a tab control to the form container. after that, i created a new user control (with 3 textboxs and two buttons). I added the "new user control" to the tab page. using 

 private void tabControl1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            TabPage tp = new TabPage("t");
            tp.Controls.Add(new  my_tab());
            tabControl1.TabPages.Add(tp);
        }

The first tab page seems fine. but in the new tab pages, One of the three textboxs is missing <= Problem to be solved. I am out of ideas. 

And what happens to the textbox names inside the new tab pages. 

I added messagebox.show in one of the buttons and it is invoked if i click the buttons from the new pages, which works fine for my case. However, I am curious about the name/id of the button I am clicking.



Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>