Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > List box/ Combo box


Reply
 
Thread Tools Display Modes
  #1  
Old 06-19-2001, 06:38 AM
Nemu Nemu is offline
Regular
 
Join Date: May 2001
Location: Montreal, Quebec, Canada
Posts: 85
Question List box/ Combo box


How can I modify the content of my list and combo boxes without having to erase every item and enteringnew one???


__________________
There is no good and no bad, just perspective and opinion.
Reply With Quote
  #2  
Old 06-19-2001, 06:53 AM
nighthawk nighthawk is offline
Junior Contributor
 
Join Date: Jun 2001
Location: WV
Posts: 280
Default Re: List box/ Combo box

You can add items using the List.AddItem code. To add new things to the list you can either type it into the combo box or a text box and use:
List.AddItem Text1.Text
Combobox.AddItem Combobox.Text
This should do it for you

Reply With Quote
  #3  
Old 06-19-2001, 07:04 AM
Nemu Nemu is offline
Regular
 
Join Date: May 2001
Location: Montreal, Quebec, Canada
Posts: 85
Default Re: List box/ Combo box

thanx for trying but no... I already have stuff in my lists and I need to be able to change them...
Exemple : Let say I have 10 items in my list....
I want to change the #6 so how can I do it without removing all items from 6 to 10 and add them after???

__________________
There is no good and no bad, just perspective and opinion.
Reply With Quote
  #4  
Old 06-19-2001, 07:08 AM
Ad1 Ad1 is offline
Senior Contributor

Retired Moderator
* Expert *
 
Join Date: Feb 2001
Location: UK
Posts: 1,287
Default Re: List box/ Combo box

bearing in mind index starts at 0 try<pre>Combo1.List(5) = "new"</pre>

Reply With Quote
  #5  
Old 06-19-2001, 07:15 AM
Nemu Nemu is offline
Regular
 
Join Date: May 2001
Location: Montreal, Quebec, Canada
Posts: 85
Default Re: List box/ Combo box

Its ok guys I got an answer... and you were right Ad1...

__________________
There is no good and no bad, just perspective and opinion.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->