472,992 Members | 3,526 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Help copying selected lines from a multiline textbox.


I am trying to write a little program for my own use using VB2005 express edition.
I have a list of peoples names in a file that I read into an array of strings. I am using a multiline textbox
to enter new, edit existing, and view the names in the array. This all works well, but now I want to be able
to select one more names from the list displayed in the multiline textbox then click a button to copy the
selected names into another list so that I can work with the names in the 2nd list. I don't want to have to
highlight all characters in a name to select it. It would be much better to be able to simply click on a name
and have the entire name selected then ctrl/click another to select a 2nd name or shift/click to select a
range of names. I've been fiiddling with textboxes and am begining to wonder if it's even possible to do this
with 2 multiline text boxes. I sure hope it can because entering the names is quick easy using the textbox.
I would really appreciate any ideas about this could be done.

Mike
"The scientist is possessed by the sense of universal
causation...His religious feeling takes the form of
rapturous amazement at the harmony of natural law,
which reveals the intelligence of such superiority
that, compared with it, systematic thinking and acting
of human beings is an utterly insignificant reflection."
Albert Einstein (theoretical physicist)
Apr 3 '07 #1
2 3378
I think what you're looking for is not the multiline textbox, but the
listbox control. Its Item property contains a collection of items that can
be selected, line by line, as you describe.

"Mike" <no********@comcast.netwrote in message
news:4e********************************@4ax.com...
>
I am trying to write a little program for my own use using VB2005 express
edition.
I have a list of peoples names in a file that I read into an array of
strings. I am using a multiline textbox
to enter new, edit existing, and view the names in the array. This all
works well, but now I want to be able
to select one more names from the list displayed in the multiline textbox
then click a button to copy the
selected names into another list so that I can work with the names in the
2nd list. I don't want to have to
highlight all characters in a name to select it. It would be much better
to be able to simply click on a name
and have the entire name selected then ctrl/click another to select a 2nd
name or shift/click to select a
range of names. I've been fiiddling with textboxes and am begining to
wonder if it's even possible to do this
with 2 multiline text boxes. I sure hope it can because entering the names
is quick easy using the textbox.
I would really appreciate any ideas about this could be done.
Apr 3 '07 #2
On Tue, 03 Apr 2007 21:38:15 GMT, "Peter" <st*****@hotmail.comwrote:
>I think what you're looking for is not the multiline textbox, but the
listbox control. Its Item property contains a collection of items that can
be selected, line by line, as you describe.
Thanks, that works great except I lost the ease of entering the names in the test box.
I just added a seperate textbox just for the purpose of initially building the list of names.
Thanks again.

Mike
"The scientist is possessed by the sense of universal
causation...His religious feeling takes the form of
rapturous amazement at the harmony of natural law,
which reveals the intelligence of such superiority
that, compared with it, systematic thinking and acting
of human beings is an utterly insignificant reflection."
Albert Einstein (theoretical physicist)
Apr 4 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Chuck Bowling | last post by:
Ok, either I'm doing something wrong or the filters in help are worthless... I'm trying to format a string... Nothing special, just formatting... like C++... How do I do a newline? i.e.,...
1
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am...
1
by: Developer | last post by:
VC++ 2005 Express Edition: I have a textBox with the properties: this->m_TextBox_Desc->Multiline = true; this->m_TextBox_Desc->WordWrap = true; this->m_TextBox_Desc->ScrollBars =...
0
by: Eric | last post by:
Visual C++ 2005 Express MVP's and experience programmer's only please!... I need to get the number of lines in a textbox so I can insert them into a listview. The text comes from my database...
0
by: Mike Collins | last post by:
I someone can please help, I am about at an end in trying to figure this out. I am adding some dynamic controls to my page (I found out that I was supposed to be doing that in the oninit event,...
5
by: Ian Tedridge | last post by:
If I have 3 textboxes on a form plus 1 multiline textbox. How can I add the text from textbox 1 to 3 to the multiline textbox ? I can add the 3 textbox contents to one line of the multiline...
19
by: Jeff | last post by:
....working with visualweb.net 2005 and vb. ....trying to simply copy the contents from a textbox to the clipboard. I've looked at a large number of places on line and they give me various...
0
by: CaJack | last post by:
Hi, I’m having trouble with my code and I’m starting to get lost. The Program takes the country that’s been typed in to the textbox and when the query button is clicked the program queries an access...
2
by: s2008 | last post by:
Hello, In my page i have two textboxes and a html button. I'm using vb.net 2.0 . what i need is i want whatever text selected in the textbox1 to be hyperlinked when clicked the button... this is...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.