954,190 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Partial Information - HELP

Hey guys,
This is my first time using Daniweb and I think I messed up! I need HELP--- I need a electronic addressbook. I need 8 text boxes:
1) name of contacts
2) company name
3) Address
4) city
5) state
6) phone
7) fax
8) email address
But the problem comes in when I try to write the program to read only partially. For example name of contact, instead of typing the whole name I only want to use partial--- Kim will pull up Kimmy, Kimlok, Kimm.

I want each textbox to read partially.

Please help
CONFUSED

nissa2424
Newbie Poster
3 posts since Nov 2006
Reputation Points: 10
Solved Threads: 0
 
Hey guys, This is my first time using Daniweb and I think I messed up! I need HELP--- I need a electronic addressbook. I need 8 text boxes: 1) name of contacts 2) company name 3) Address 4) city 5) state 6) phone 7) fax 8) email address But the problem comes in when I try to write the program to read only partially. For example name of contact, instead of typing the whole name I only want to use partial--- Kim will pull up Kimmy, Kimlok, Kimm. I want each textbox to read partially. Please help CONFUSED

Sounds like a problem with class design to me.

public class addressBook
{
    string contactName
    string phoneNo
}


Then you could search the array of objects by either .contactName or .phoneNo etc.

iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
 

>For example name of contact, instead of typing the whole name I only
>want to use partial--- Kim will pull up Kimmy, Kimlok, Kimm.
I can think of a few ways to do this. The first is autocomplete where you keep track of the characters being entered, search for the string up to the most recent character typed and complete the entry with the first match of that search (the TextBox control supports this feature natively). Next, you can do the same thing except filter the contents of a combo box instead of just using a straight text box. A more user friendly design would probably use a tooltip and/or context menu with suggested matches, but that would take a little more work.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

You might also need to use the get key pressed thingy? I must admit I missed that part:

want to use partial--- Kim will pull up Kimmy, Kimlok, Kimm.
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
 
Hey guys, This is my first time using Daniweb and I think I messed up! I need HELP--- I need a electronic addressbook. I need 8 text boxes: 1) name of contacts 2) company name 3) Address 4) city 5) state 6) phone 7) fax 8) email address But the problem comes in when I try to write the program to read only partially. For example name of contact, instead of typing the whole name I only want to use partial--- Kim will pull up Kimmy, Kimlok, Kimm. I want each textbox to read partially. Please help CONFUSED


you need an ontextchange event that will popup a list of possible names based on the letter typed.

if your information is stored in a database you could do this very easily.

like when they start to type the letter k an SQL statement would run that would return

SELECT FIRSTNAME FROM [SOMEDATABASE] WHERE FIRSTNAME LIKE 'k%';

but thats the best i can come up with.

or prebuild an array with all of the names sorted by letter and then use the same logic.. :!:

Killer_Typo
Master Poster
781 posts since Apr 2004
Reputation Points: 152
Solved Threads: 39
 

you have to trap ontext change event by double clickiking on textbox in design form, and run sql like(select (columnname) frm(database)where (columnname) like =' "'"+textboxname.text+"'"%'

amithasija
Light Poster
44 posts since Nov 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You