|
-
Nov 17th, 2011, 03:15 PM
#1
Thread Starter
Member
List Boxes
i want to convert text box inputs into a list box. i have 7 text boxes like; fname, lname , email, phone, etc
how would would i call those textboxes into a list box. also it it possible to make headers for the the listbox.
Thanks for the help!
-
Nov 17th, 2011, 03:23 PM
#2
Re: List Boxes
If you are talking about headers for a Listbox, think about using either a DataGridView or a ListView (in Detail mode) instead. Both of those have headers, whereas a Listbox will not.
And considering that suggestion, there is hardly any point in answering the original question. After all, if you decide that headers are important, then the means of entering data into a listbox isn't important, since entering data into a ListView or DGV would be considerably different, so which would you really like?
My usual boring signature: Nothing
 
-
Nov 29th, 2011, 02:16 PM
#3
Thread Starter
Member
Re: List Boxes
what i was trying to say was if i enter the data
Joe Doe
[email protected]
555-555-5555
each input has a seperate textbox for name , email, phone, how would i get that information into a listbox. So whatever the enter will be put in to the listbox.
-
Nov 29th, 2011, 02:21 PM
#4
Re: List Boxes
You can do
Code:
ListBox1.Items.Add Textbox1.text & " " & Textbox2.Text & " " & TextBox3.text
But, as ShaggyHiker points out, you can't do headers with a listbox and your entries will not be uniform.
I echo the suggestion of switching to either a datagridview or a Listview (in Details mode)
-
Nov 29th, 2011, 02:24 PM
#5
Frenzied Member
Re: List Boxes
Your question is a bit confusing? As Shaggy said ListBox doesnt have headers, so DGV would be a better option if your looking for Headers
In your post#3 you seem to be asking how to get TextBox info into a list box and doesnt mention headers?
With that said here is simple idea to put textbox info into to a list box
Code:
Me.ListBox1.Items.Add(Me.TextBox1.Text)
Me.ListBox1.Items.Add(Me.TextBox2.Text)
Hope this helps
Last edited by billboy; Nov 29th, 2011 at 02:53 PM.
-
Nov 29th, 2011, 02:28 PM
#6
Thread Starter
Member
Re: List Boxes
Thank You! ..... also what if i am using seperate forms do i need to do something else like friend?
-
Nov 29th, 2011, 02:52 PM
#7
Frenzied Member
Re: List Boxes
 Originally Posted by clintc10
Thank You! ..... also what if i am using seperate forms do i need to do something else like friend?
you mean your textboxes are on different forms? try to be more clear when asking a question, take a few extra minutes to write out your question and re-read it to yourself and ask yourself, if you were reading it would it make sense to you??
If you have textboxes on seperate form
just reference the form
Form3.TextBox1.Text etc.. (Form3)or what ever form the textbox is on
-
Nov 29th, 2011, 03:29 PM
#8
Thread Starter
Member
Re: List Boxes
MembersForm.MemberListBox.Items.Add(FNameTextBox.Text & " " & LNameTextBox.Text)
This is what i have and it is not working.
I have a membership form and a members form.
The textboxes are in the membership form and the listobx is on the members form.
-
Nov 29th, 2011, 03:34 PM
#9
Frenzied Member
Re: List Boxes
 Originally Posted by clintc10
MembersForm.MemberListBox.Items.Add(FNameTextBox.Text & " " & LNameTextBox.Text)
This is what i have and it is not working.
I have a membership form and a members form.
The textboxes are in the membership form and the listobx is on the members form.
Dont know what form your code is on but you probably need to reference the textboxes like this
Membership.FNameTextBox1.Text & "" & Membership.LNameTextBox.Text
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|