Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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
 
Old March 13th, 2005, 11:06 PM
Registered User
 
Join Date: Aug 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to augie0216
Default adding to a listbox

I'm using a menu to add an item to the listbox. I'm using this code.

   Private Sub mmuRecordSaveArrival_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mmuRecordSaveArrival.Click
Me.AircraftID .Items.Add(txtAircraftID.Text)

I enter the AircraftID in the text box but when I click the menu the word system.window appears in the listbox instead of the aircraftID.
I can't figure out why, is it because i don't have the selected index code filled out.
Any help is appreciated

 
Old March 17th, 2005, 08:17 AM
Authorized User
 
Join Date: Mar 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
   in the code below an item say TextBox1.Text is inserting in the the ListBox on clicking a button...

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Me.ListBox1.Items.Add(TextBox1.Text)
    End Sub

Bye






Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem while adding values to Listbox Kapil Access VBA 1 February 5th, 2007 07:35 AM
adding SelectedIndexChanged event to listbox msrnivas General .NET 1 July 19th, 2005 02:47 PM
Adding directory structure to a listbox EddyT Excel VBA 0 March 7th, 2005 06:40 AM
Adding items to ListBox on the client. chessgame General .NET 4 August 7th, 2004 12:05 PM
Adding data into multi-column listbox Ciarano VB How-To 5 March 31st, 2004 05:07 AM





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