Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 255379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:55:32+00:00 2026-05-11T21:55:32+00:00

i have the following situation : with my function i get an XML file

  • 0

i have the following situation :
with my function i get an XML file , parse it and add group box with image and a text box for every post node in the XML file , And for each group box i assign name and toolstrip menu which has a dinamicly added 1 item the thing i want to do is this – when clicked this item ( lets say the item has name Jeff) so .. when i press the menu item Jeff to add text to a text box ( the text is “@Jeff) . as u can see i managed to make the name adding in the toolstripmenu but i cant make it when i clic to add the name to the text box for each person

and here is my function so you could see what im talking about

 public void parseXmlatme()

    {


        string sUser, sUrl;

        string avatar;
        sUser = Settings.Default.user;
        AtMeFlowLayoutPanel.Controls.Clear();
        sUrl = "http://edno23.com/api/xml/get.php?username=" + sUser + "&type=posts_mention_me";
        rssReader = new XmlTextReader(sUrl.ToString());
        rssDoc = new XmlDocument();
        rssDoc.Load(rssReader);

        for (int i = 0; i < rssDoc.ChildNodes.Count; i++)
        {
            if (rssDoc.ChildNodes[i].Name == "edno23")
            {
                nodeRss = rssDoc.ChildNodes[i];
            }
        }

        for (int i = 0; i < nodeRss.ChildNodes.Count; i++)
        {
            if (nodeRss.ChildNodes[i].Name == "posts")
            {
                nodeChannel = nodeRss.ChildNodes[i];
            }
        }

        for (int i = 0; i < nodeChannel.ChildNodes.Count; i++)
        {
            if (nodeChannel.ChildNodes[i].Name == "post")
            {
                nodeItem = nodeChannel.ChildNodes[i];
                string C;
                C = nodeItem["user_from"].InnerText;
                avatar = nodeItem["user_from_avatar"].InnerText; ;
                // 
                // groupBox1
                // 
                GroupBox grpBox = new GroupBox();
                TextBox txtBox = new TextBox();
                PictureBox picBox = new PictureBox();
                ContextMenuStrip  rightMenu = new ContextMenuStrip();
                ToolStripMenuItem atMe = new ToolStripMenuItem();

                // 
                // rightMenu
                // 
                rightMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
                atMe});
                rightMenu.Name = "rightclick";
                rightMenu.Size = new System.Drawing.Size(153, 70);
                // 
                // toolStripMenuItem2
                // 
                atMe.Name = "toolStripMenuItem2";
                atMe.Size = new System.Drawing.Size(152, 22);
                atMe.Text = "@"+C;
                name = C;
                atMe.Click += atMe_Click;



                 ////
                grpBox.Location = new System.Drawing.Point(3, 3);
                grpBox.Name = "grpBoxatme" + i;
                grpBox.Size = new System.Drawing.Size(301, 73);
                grpBox.TabIndex = 0;
                grpBox.TabStop = false;
                grpBox.Text = C;
                grpBox.ContextMenuStrip = rightMenu;
               // rightMenu.Items.Add(C);
                // txtbox
                txtBox.BackColor = System.Drawing.SystemColors.ControlLightLight;
                txtBox.Location = new System.Drawing.Point(59, 16);
                txtBox.Multiline = true;
                txtBox.Name = "txtBoxatme" + i;
                txtBox.ReadOnly = true;
                txtBox.Size = new System.Drawing.Size(235, 49);
                txtBox.TabIndex = 2;
                txtBox.Text = nodeItem["message"].InnerText;

                //pic box
                picBox.Dock = System.Windows.Forms.DockStyle.Left;
                picBox.ImageLocation = "http://img.edno23.com/avatars/thumbs/" + avatar;
                picBox.Location = new System.Drawing.Point(3, 16);
                picBox.Name = "pictureBoxatme" + i;
                picBox.Size = new System.Drawing.Size(50, 54);
                picBox.TabIndex = 0;
                picBox.TabStop = false;

                AtMeFlowLayoutPanel.Controls.Add(picBox);
                AtMeFlowLayoutPanel.Controls.Add(grpBox);
                grpBox.Controls.Add(picBox);
                grpBox.Controls.Add(txtBox);
            }
        }




    }

`

Thanks in advance .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:55:32+00:00Added an answer on May 11, 2026 at 9:55 pm

    here is a clue that helped me solve the question.

    using System;
    
    using System.Drawing;
    
    using System.Windows.Forms;
    
        public partial class Form1 : Form
        {
            public Button sb;
            public Form1()
            {
                InitializeComponent();
            }
    
            private void Form1_Load(object sender, EventArgs e)
            {
                for (int x = 0; x < 10; x++)
                {
                    sb = new Button();
                    sb.Size = new Size(25, 25);
                    sb.Location = new Point(x * 25, 10);
                    sb.Visible = true;
                    sb.Text = x.ToString();
                    sb.Click += new EventHandler(sb_Click);
                    Controls.Add(sb);
                }
            }
    
            private void sb_Click(object sender, System.EventArgs e)
            {
                Button sb = sender as Button;
                this.Text = sb.Text;
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 147k
  • Answers 147k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It's null. C# Language Specification 3.0 (Section §7.2.7: Lifted operators)… May 12, 2026 at 9:08 am
  • Editorial Team
    Editorial Team added an answer If you really want ISO-Latin-1, you can use Encoding.GetEncoding(28591); But… May 12, 2026 at 9:08 am
  • Editorial Team
    Editorial Team added an answer This is some kind of namescoping issue. If you move… May 12, 2026 at 9:08 am

Related Questions

I have a control that, upon postback, saves form results back to the database.
First of all, I'm fairly sure snapping to grid is fairly easy, however I've
Is it recommended to always have exhaustive pattern matches in Haskell, even for impossible
This is one of those situations where I've had to pick up and run

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.