Click here to Skip to main content
15,899,025 members
Home / Discussions / C#
   

C#

 
GeneralRe: [Help] C# .txt Pin
Brisingr Aerowing18-Nov-12 22:32
professionalBrisingr Aerowing18-Nov-12 22:32 
GeneralRe: [Help] C# .txt Pin
omisheikh18-Nov-12 22:34
omisheikh18-Nov-12 22:34 
GeneralRe: [Help] C# .txt Pin
mumbot19-Nov-12 0:02
mumbot19-Nov-12 0:02 
AnswerRe: [Help] C# .txt Pin
CafedeJamaica19-Nov-12 7:54
professionalCafedeJamaica19-Nov-12 7:54 
QuestionAnother conversion problem (Prism) Pin
Andy_L_J18-Nov-12 11:07
Andy_L_J18-Nov-12 11:07 
AnswerRe: Another conversion problem (Prism) Pin
Pete O'Hanlon18-Nov-12 11:39
mvePete O'Hanlon18-Nov-12 11:39 
GeneralRe: Another conversion problem (Prism) Pin
Andy_L_J18-Nov-12 11:47
Andy_L_J18-Nov-12 11:47 
QuestionSending bytes via internet? (info) Pin
clonze18-Nov-12 1:22
clonze18-Nov-12 1:22 
AnswerRe: Sending bytes via internet? (info) Pin
Eddy Vluggen18-Nov-12 1:50
professionalEddy Vluggen18-Nov-12 1:50 
GeneralRe: Sending bytes via internet? (info) Pin
clonze18-Nov-12 3:54
clonze18-Nov-12 3:54 
GeneralRe: Sending bytes via internet? (info) Pin
Eddy Vluggen18-Nov-12 4:42
professionalEddy Vluggen18-Nov-12 4:42 
QuestionConverting from VB.NET Pin
Andy_L_J17-Nov-12 21:39
Andy_L_J17-Nov-12 21:39 
AnswerRe: Converting from VB.NET Pin
DaveyM6917-Nov-12 22:23
professionalDaveyM6917-Nov-12 22:23 
GeneralRe: Converting from VB.NET Pin
Andy_L_J17-Nov-12 22:54
Andy_L_J17-Nov-12 22:54 
GeneralRe: Converting from VB.NET Pin
DaveyM6918-Nov-12 7:10
professionalDaveyM6918-Nov-12 7:10 
GeneralRe: Converting from VB.NET Pin
Andy_L_J18-Nov-12 11:12
Andy_L_J18-Nov-12 11:12 
Questionfiltering column value in DevExpress grid view Pin
eli1502197917-Nov-12 20:23
eli1502197917-Nov-12 20:23 
AnswerRe: filtering column value in DevExpress grid view Pin
n.podbielski17-Nov-12 21:29
n.podbielski17-Nov-12 21:29 
Questionhelp Pin
AMIR ESLAMI17-Nov-12 9:08
AMIR ESLAMI17-Nov-12 9:08 
AnswerRe: help Pin
Eddy Vluggen17-Nov-12 9:25
professionalEddy Vluggen17-Nov-12 9:25 
AnswerRe: help Pin
Abhinav S18-Nov-12 20:58
Abhinav S18-Nov-12 20:58 
QuestionAccess to created control Pin
KKW_acd17-Nov-12 5:18
KKW_acd17-Nov-12 5:18 
Here is my code:

C#
private void loadDataToolStripMenuItem_Click(object sender, EventArgs e)
{
     TabPage tp = new TabPage();
     tp.Text = "Data";
     System.Windows.Forms.CheckedListBox AvailableDataList = new system.Windows.Forms.CheckedListBox();
     AvailableDataList.Dock=DockStyle.Fill;
     tp.Controls.Add(AvailableDataList);

    for (bb = 0; bb < 8; bb++)
    {
        AvailableDataList.Items.Add("Bob");
        switch(SelectName(bb))
        {
            case false:
                AvailableDataList.SetItemChecked(bb, false);
                break;
            case true:
                AvailableDataList.SetItemChecked(bb, true);
        }
    tabControl1.TabPages.Add(tp);
}


private void button4_Click(object sender, EventArgs e)
{
    label1.text = AvailableDataList.Items.Count;
}


The code under the loadDataToolStripMenuItem works just fine.
I’m creating a CheckedListBox, populating it, then creating (adding) a TabPage, and placing the CheckedListBox on the new tab.
Problem is the created CheckedListBox AvailableDataList is not accessible in the button4_Click routine.
I don’t know how to make it public throughout the form.
Can someone help?
Thanks!
AnswerRe: Access to created control Pin
DaveyM6917-Nov-12 7:30
professionalDaveyM6917-Nov-12 7:30 
QuestionHow do you programatically open a file in c# to append? Pin
Xarzu17-Nov-12 1:05
Xarzu17-Nov-12 1:05 
AnswerRe: How do you programatically open a file in c# to append? Pin
DaveyM6917-Nov-12 1:35
professionalDaveyM6917-Nov-12 1:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.