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

  • Home
  • SEARCH
  • 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 8070485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:24:34+00:00 2026-06-05T13:24:34+00:00

I have a Windows Form with a ListBox. The form has this method public

  • 0

I have a Windows Form with a ListBox. The form has this method

public void SetBinding(BindingList<string> _messages)
{
  BindingList<string> toBind = new BindingList<string>( _messages );
  lbMessages.DataSource = toBind;
}

Elsewhere, I have a class called Manager that has this property

public BindingList<string> Messages { get; private set; }

and this line in its constructor

Messages = new BindingList<string>();

Finally, I have my startup program that instantiates the form and the manager and then calls

form.SetBinding(manager.Messages);

What else do I have to do so that a statement in Manager like this:

Messages.Add("blah blah blah...");

will cause a line to be added to and displayed immediately in the form’s ListBox?

I don’t at all have to do it this way. I just want my Manager class to be able to post to the form while it is doing its job.

  • 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-06-05T13:24:35+00:00Added an answer on June 5, 2026 at 1:24 pm

    I think the problem is with your SetBinding method where you are making a new binding list, which means you aren’t binding to the list in the Manager object anymore.

    Try just passing the current BindingList to the datasource:

    public void SetBinding(BindingList<string> messages)
    {
      // BindingList<string> toBind = new BindingList<string>(messages);
      lbMessages.DataSource = messages;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have ListBox called lstProductGroups. On a simple Windows Form, a method called GetGroups
I have a button on my windows form that calls the RunWorkerAsync() method, this
I'm new to this site, and basically I have created a Windows Form using
I have two listbox in windows Form c#, the first one has all valid
I have a Windows Form application. Version 1 of my app has been released
I have a windows form simply like this: 1) a button when clicked will
Let's say I have a listbox and two buttons in a windows form application.
I have a ListBox on a Windows Form that is populated during the Form_Load
In a Windows Form window, multiple events can trigger an asynchronous method. This method
With a listbox visible, I have clicked on the windows form hoping to use

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.