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

Related Questions

I have the following situation: I have a certain function that runs a loop
I`m currently working on a script, and I have the following situation. function somnicefunction()
I have the following situation: <input id=upload_trigger_btn type=file name=files[] multiple> <a type=submit class=button-normal-12px-ffffff href=#><span>Add
I have the following situation. <ul> <li><span> text </span></li> </ul> I use the following
I have the following situation: function dog() { this.name = 'Lumpy'; this.getName = function()
Imagine I have the following situation: File1.php <?php include(Function.php); log(test); ?> Function.php <?php function
I have following situation: I have loged user, standard authentication with DB table $authAdapter
I have following situation. A main table and many other tables linked together with
I have following situation. In a constructor of a pseudo class I attach a
I have following situation (simplified, of course): MyDomain.groovy: class MyDomain { MyAnotherDomain anotherDomain //

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.