Click here to Skip to main content
15,907,392 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hello guys,

I have a tabcontrol. There are some panels(PANEL_FORM) and also there are some labels into these panels. These panels are opened when the user click the labels. After clicked, the form is opened into the tabpage. I think because of this, I cannot select the value in the textbox in the form after it's opened in the tabpage.

Is there anyone who knows how to solve this problem?

C#
    PANEL_FORM pn = new PANEL_FORM();
    pnAnamenu.Controls.Clear();
    pnAnamenu.Controls.Add(pn.pnYedek); //pnYedek is the name of the panel
    pn.pnYedek.Dock = DockStyle.Fill;


private void label8_Click(object sender, EventArgs e)
{
    SOZLESME_LISTESI sl = new SOZLESME_LISTESI(); //the name of the form
    sl.Name = "SOZLESME_LISTESI";
    sl.Text = "SÖZLEŞME LİSTESİ";
    anm.TabEkle(sl);
}

"TabEkle - TabAdd"
"anm - ANA_MENU anm=(ANA_MENU)Application.OpenForms["ANA_MENU"];"
"ANA_MENU - MAIN_MENU"

Regards

Haluk
Posted
v3
Comments
dimpledevani 23-Jul-12 5:07am    
msy be your textbox is readonly or disabled
haluk_78 23-Jul-12 5:15am    
There is no any problem about entering the value into the textbox.
The problem is after the programme is started, when the value is displaying into the textbox, we cannot select it... For example, there is a long text and I try to select any of the word into the textbox...However I cannot... The mouse choose all of them...
Please provide your whole code.
haluk_78 23-Jul-12 6:48am    
private void button1_Click(object sender, EventArgs e)
{
//renkdegistir(btnDaireIslem); //to change the color of button
PANEL_FORM pn = new PANEL_FORM();
pnAnamenu.Controls.Clear();
pnAnamenu.Controls.Add(pn.pnDaireİslem);
pn.pnDaireİslem.Dock = DockStyle.Fill;
}

private void label2_Click(object sender, EventArgs e)
{
Daire_Islemleri dr = new Daire_Islemleri();
dr.Name = "Daire_Islemleri";
dr.Text = "DAİRE İŞLEMLERİ";
anm.TabEkle(dr);
}
After clicked the label2, the form which is named "DAİRE İŞLEMLERİ" is opened in the tabpage. The main problem is we cannot select the values in the textbox in this form.

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