|
-
Oct 12th, 2003, 06:19 AM
#1
Thread Starter
Frenzied Member
text positions in a textbox
Hey all.
I am working on my movie database and came up on a question
I wrote a piece of code where the actor list, separated by commas is bound to a regular textbox.
When I drag the cursor across a person's name, a new form opens with that person's pic and data
To enhance that feature, I did a quicksearch box where I begin typing the actor's name and on txtActors_Change, the code runs a Query "Actors Like 'txtActors.text & *', I guess you get the picture. So I've reached the next step, where I want to add two features:
1. When the Query runs, it moves the RS forward to the next record wherein the name matches. I'd like for it to highlight the text in the textbox that matches the query text (even if it is just the first match in the textbox)
2. I'd like to be able to doubleclick a position on the textbox (for example, between the letters of someone's name) and return a string (by locating the commas on either side) that I can then extract the entire name from to make the info form pop up. The reason for that is simply that it's slightly annoying to have to click down exactly at the person's name and drag over just to the end of his name.
Both of these would require some sort of position information. What I'm afraid of is that it will require a richtextbox,which i usually avoid because I'm not too familiar with them.
Anybody done anything like this?
Do you have a sample code?
Does it have to be rtb?
Thanks
Wengang
Wen Gang, Programmer
VB6, QB, HTML, ASP, VBScript, Visual C++, Java
-
Oct 12th, 2003, 10:47 AM
#2
Retired VBF Adm1nistrator
It doesn't need to be an RTB. You can use the .Sel* properties of a normal textbox.
But, unless the database server is very fast, your application is going to run very slow I would imagine, if on keychange your application is calling a database search to commence...
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
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
|