473,666 Members | 2,237 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding multiple columns in list boxes

6 New Member
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 7719
BSOB
77 New Member
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 New Member
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
papa smerf
6 New Member
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 Recognized Expert Top Contributor
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
2278
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 each row, and put the total at the end of the row. What is the javascript to sum the values to a few text boxes, and how would I write the script for these totals to run all at once? Thanks.
0
1257
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. It should create in new table row. Code is below and if you see anything else you would change please provide for optimization. And Thanks. Code below. <script runat="server"> Private Sub Page_Load
6
2499
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 products). Tables: tblCategoryDetails CategoryID SpecID
11
4517
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 database,just help in getting me pointed in the right direction. I have a database with 8 tables, which from what I have read, cannot be linked on a single form, and be updatable. I have created a query which includes all 8 tables, and then...
1
2568
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 has 4 possible answers to a question. Each of the 4 possible answers is also assigned a value: answer 1 is worth 1 point, answer 2 is worth 2 points.... What I need to do now is add togethor the points of all the combo boxes. So far I have given...
0
2739
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 multiple categores (check boxes) and view only the results in those categories in a gridView control. My goal is to do so for movies, so an example would be if the user checks comedy and childrens then they would only get childrens comedies and the...
6
9413
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 report" button located on my form to print all of the list box values (that have been updated via selection from combo boxes) from the form to the report. I've tried using a macro with the code: Macro Name: cmdGenerateReport : On Click Action:...
12
4029
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 not several, to report using this code i found - Private Sub cmdPreview_Click()
1
2307
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 called columns. I set it to 2 but how do I populate each column? I'm using VB6 Thanks!
0
8440
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8355
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8866
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8550
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8638
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7381
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6191
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2769
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2006
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.