Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
| Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 19th, 2006, 08:07 PM
Registered User
 
Join Date: Feb 2006
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to Update a Listbox on Different Form

Hello. I have a Listbox, listBoxA (say), on FormA. Now, there are two other Forms, FormB and FormC, with textboxes textBoxB and textBoxC.

The items in listBoxA are added to via textBoxB and textBoxC; either textbox can add an item. Can this be done? How can this be done?

Here's what I could come up with: Write item from either textbox to a textfile and read the items from the textfile for the listbox. It works but if FormA (with the listbox) is open, I must close it and re-open to see new item(s).

Anyone know of a better way, especially where I don't have to re-open the Form with the listbox? Thanks!

  #2 (permalink)  
Old February 19th, 2006, 08:16 PM
Registered User
 
Join Date: Feb 2006
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

... This is in C#. Thanks.

  #3 (permalink)  
Old February 24th, 2006, 12:22 PM
Authorized User
 
Join Date: Feb 2006
Location: Bluefields, , .
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to MAKO
Default

I think that maybe creating a class to handle the listbox┬┤s source and refreshing the form c woul be of some help.

:-Q Marvin B-)


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiselect listbox selction and update table Suresh62 Access 58 January 2nd, 2008 08:39 AM
Listbox problem when insert or update hcanales ASP.NET 1.x and 2.0 Application Design 1 September 21st, 2006 02:53 PM
loop through listbox and update record stoneman Access 1 August 5th, 2005 03:43 AM
Listbox selection in a form jpcoutts Access 1 November 10th, 2004 05:02 PM
listBox +Update problem dvarrin C# 0 November 26th, 2003 05:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.