473,396 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Adding multiple columns in list boxes

I have a list box that I want to have 3 columns of data.

For example:
FirstName, LastName, Phone, Catagory
I want to display the FirstName, LastName and Phone in the 3 columns, I will use catagory for sorting.

I have 4 textboxes to enter the data and a button to add it to the list box.

I am new to Visual Basic.Net and New to programming in general. I am in a Visual Basic.Net class a the local college, I know how to add data to a list box when there is only one column, but we haven't gotten into multiple columns.

Thanks
Gary
Jul 16 '06 #1
4 7708
BSOB
77
i could be completely wrong, but in my messing around i think ive descovered that listboxes are exactly that; lists. a list is a 1 dimentional array, and has no "columns".
solution 1:
multiple textboxes,
put 4 text boxes side by side. have each data point added to the apporpriate list with the same listindex. then you would have to figure out how to have them scroll togeather.
solution 2: have one textbox, and seperate your data points with something other than columns. for example use a comma. depending on your application this would make it imposible for the user to select an individual data point without the other 2.
Jul 18 '06 #2
BSOB
77
oh yah...
solution 3:
design your own object.
(and send me a copy)
solution 4:
have 4 text boxes side by side (multiline = true) with a single vertical scroll bar at the far right. i would have the textboxes in an array. use the scroll bar select the range of data that will be desplayed in the text boxes. at each change of the scroll bar, reinsert each list item in each box.
solution 5: (and probably best solution)
a long time ago i got an excel spead sheet onto a form. manipulating it wasnt difficult and proved intuitive. you would be able to show 4 columns and have it scroll vertically. i dont remember if it were a component and where i found it.
solution 6: (oh! even better!)
microsoft data grid control. it is a component that comes with visual basic. never used it, but it fits your needs.
Jul 18 '06 #3
Thanks for the info, but I think I have another way. I padded each word with extra spaces so each word is the same size. I tryed it and it works, but you need to use the right font or else different size letters through the line off.

Thanks again
Gary
Jul 18 '06 #4
iam_clint
1,208 Expert 1GB
You might look into Listview try searching google. you might beable to come up with what your looking for.
Jul 18 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Frank | last post by:
I have a large form, that has text boxes of numbers in rows and columns. I need to sum the values in the columns, and put the total at the bottom of the column. But I also need to sum the values in...
0
by: LU | last post by:
I have code to dynamically add more text boxes when the user clicks the 'add another carrier' button. Problem is it creates the text boxes within the same table row as previously created boxes. ...
6
by: Robin S. | last post by:
**Eric and Salad - thank you both for the polite kick in the butt. I hope I've done a better job of explaining myself below. I am trying to produce a form to add products to a table (new...
11
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my...
1
by: Shawn Yates | last post by:
It has been a while since I have done anything on MS Access and I seem to be a bit rusty. I hope someone could help me solve my issue. I have a form that has multiple combo boxes on it. Each box...
0
by: joebob8000 | last post by:
This seems like a simple task, but my 6 year old roots in classic ASP must be causing me trouble with my current problem. I am looking to provide a search for users in which they can select...
6
by: Dave | last post by:
On my form I have combo boxes. These combo boxes, after updating them, populate respective listboxes that are located below the combo boxes on the same form. I am trying to use a "generate...
12
by: micarl | last post by:
How would i print a report based on criteria selected from several Combo Boxes as well as multiple Multi Select List Boxes, that are located on the same form? I can get one Multi List Box, just...
1
AaronL
by: AaronL | last post by:
Hello, I want to display data in a list box but I'd like to have multiple columns kind of how a spreadsheet would look. How can I do this. I noticed in the listbox control there is a property...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.