|
-
Jul 18th, 2008, 08:09 AM
#1
Thread Starter
Member
is it possible to code a textbox with automatic complete?
a textbox control with automatic complete function like vb.net coding?
With the automatic complete function, the textbox control will show an additional window for prompting user's input.
by the way, I do not want to use combobox. also the automatic complete function in combobox is very ugly.
thanks!
-
Jul 18th, 2008, 08:23 AM
#2
Re: is it possible to code a textbox with automatic complete?
From .NET 2.0 the TextBox control supports autocomplete functionality. If you'd read the documentation for the TextBox class, or just looked in the Properties window, you'd have seen the properties whose names start with "AutoComplete". That would be the tell. Look first, ask questions later.
-
Jul 18th, 2008, 09:59 AM
#3
Thread Starter
Member
Re: is it possible to code a textbox with automatic complete?
Maybe I did not find the "automatic complete" in the property window.
I will check that again.
by the way, can i Pre-define the automatic complete items?
you guys are not friendly, but anyway I will thank you for your reply.
-
Jul 18th, 2008, 05:12 PM
#4
Re: is it possible to code a textbox with automatic complete?
This should help you
Code:
Dim arr_strVAlues() As String = New String() {"This", "Is", "Sample", "Text"}
TextBox1.AutoCompleteMode = AutoCompleteMode.SuggestAppend
TextBox1.AutoCompleteSource = AutoCompleteSource.CustomSource
TextBox1.AutoCompleteCustomSource.AddRange(arr_strVAlues)
__________________
Rate the posts that helped you 
-
Jul 18th, 2008, 09:49 PM
#5
Re: is it possible to code a textbox with automatic complete?
It's only me that that isn't friendly, and then only when the person asking the question has ignored the information that is immediately available to them. Lots of other people are quite happy to post the obvious, so don't let my reply put you off.
-
Jul 19th, 2008, 10:17 AM
#6
Re: is it possible to code a textbox with automatic complete?
 Originally Posted by stripling
you guys are not friendly, but anyway I will thank you for your reply.
i didnt noticed that
__________________
Rate the posts that helped you 
-
Jul 19th, 2008, 01:25 PM
#7
Re: is it possible to code a textbox with automatic complete?
jmc is rather short-tempered, but the fact is you really should have taken a look at the BEFORE YOU POST sticky at the top of this forum. Reading that, and applying it's advice makes it easier for us to understand your problem and increases your likelihood of getting a useful reply
-
Jul 19th, 2008, 03:25 PM
#8
Re: is it possible to code a textbox with automatic complete?
I'd just like to say as well that I originally thought some of the more experienced users on here were quite unfriendly and rude but after being on here for a while now I can see why... I mean so many people ask the same questions that have already been answered so many times before and like jmc said, if people bothered reading the documentation then about 50% of the questions on here would probably not need to be posted. Having said that though, sometimes when you are fairly new to a particular method of doing something or even new to VB.NET itself then the official documentation is sometimes a bit hard to understand.
Anyway yeah, pointless post over.
-
Jul 19th, 2008, 05:56 PM
#9
Fanatic Member
Re: is it possible to code a textbox with automatic complete?
Yes, but don't you love forums where we come to for human interaction and right enough, you get told off good. Feel free to read the docu, ask questions here and don't take the scolding personally. You will learn by leap years.
-
Jul 19th, 2008, 07:36 PM
#10
Re: is it possible to code a textbox with automatic complete?
People often make the mistake of thinking that I post here to solve people's problems. I don't. I post here to help make people better developers. Telling you the names of the properties you need to use to implement auto-complete in a TextBox may help solve your problem but it's not the best way to become a better developer. You need to learn to pay attention to the IDE that's right in front of you and also to use the Help documentation that is just a couple of clicks away. That is how you become a better developer because you learn where to find the information to solve a great many of the your own problems, and much quicker too. It's YOU who benefit from that. If I can jolt people into helping themselves then I've helped them.
That said, there are still plenty of problems that will require posting on forums. Heck, I've posted questions myself. It's never the simple ones that only require the use of one method or one property that could be found easily by a quick look in the doco. If you always look first and ask questions later, you'll become a better developer more quickly. You'll also get far more satisfaction from solving problems yourself than having everything done for you.
-
Jul 19th, 2008, 08:55 PM
#11
Fanatic Member
Re: is it possible to code a textbox with automatic complete?
 Originally Posted by jmcilhinney
If I can jolt people into helping themselves then I've helped them.
There's a good T-shirt for ya, jmc 

*The Defibrillator*
Last edited by Xancholy; Jul 19th, 2008 at 10:03 PM.
-
Jul 21st, 2008, 08:14 AM
#12
Thread Starter
Member
Re: is it possible to code a textbox with automatic complete?
I went back and checked my program. I found the "automatic list" item in the property window. sorry, it is complete my fault...
But the realy probelm is I will bother you guys again. Actually, what I want in my program is a little bit different from the "automatic list" function that existed in vb.net
My Program is a unit converter. it will converter any English unit to SI unit and vice versa. I use textbox control as a container to receive the user's input. Considering user input a unit as "btu/hr". in the first moment the "Automatic List" should show "btu" when "b" is input. Then it should show "hr" when the "h" letter is pressed. Remember the "btu" and "hr" words are stored in the "Automatic List" seperately. In other word "Btu/hr" would not be shown simultaneously in my program, nor they saved as a item in "Automatic List".
I do not know if my discription is clear or not since english is not my mother tounge.
-
Jul 21st, 2008, 10:42 PM
#13
Thread Starter
Member
Re: is it possible to code a textbox with automatic complete?
VB.net - A power tool for my engineering life.
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
|