02-11-2003, 07:26 PM
|
#1
|
|
Registered User
Join Date: Oct 2002
Location: Jackson, TN
Posts: 22
|
combo box question?
hey,
no FLA to post, but i'm just pondering a thought..
i know that you can make a combo box editable, so that the user can begin typing in a response.. Is there a way to make the combobox search its own contents? I guess what i'm looking for is to emulate a dropdown menu like in HTML/Javascript.. so as the user types, the selection in the dropdown menu tries to "predict" the users choice.. This way, they can type a partial word, and the menu find the item as they type...
sorry for the bad description,but any input on this would be great.. thanks,
-myk
|
|
|
02-13-2003, 04:26 PM
|
#2
|
|
Registered User
Join Date: Dec 2002
Posts: 15
|
I bought a book that has an example for word completion done by Actionscript.
Object-Oriented Programming with ActionScript
by Branden Hall & Samuel Wan
CH 13 pg. 292
You will have to make a custom combo box or at least override the onChanged event handler for the out of the box components. Basically every time there is a change in the box, the method looks for a matching list item and if it finds one, it displays it in it's entirety with in the box.
|
|
|
02-13-2003, 10:54 PM
|
#3
|
|
Master of Nothing
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
|
I haven't read the book treefield mentioned, but I did write something that does what you ask. Actually it does more, it will add the item to the list when you press enter if its not already there. And it will delete the item from the list if you press delete. It will also try and match what you are typing while you are doing it. It uses the normal combobox with a Key listener.
Is this what you are asking for?
http://www.irq11.com/~louie/portfoli...martCombo.html
|
|
|
02-14-2003, 12:30 AM
|
#4
|
|
Banned by AS.org Staff
Join Date: Mar 2002
Posts: 10,533
|
Just tested this out and this seems exactly what mykrob was after.
Tried a .fla extension on your link, and it worked. Thank you very much.
|
|
|
02-14-2003, 12:48 AM
|
#5
|
|
Banned by AS.org Staff
Join Date: Mar 2002
Posts: 10,533
|
A nice addition to this would be no difference on input between caped and uncaped charracters!
|
|
|
02-14-2003, 12:50 AM
|
#6
|
|
Master of Nothing
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
|
|
|
|
02-14-2003, 01:14 AM
|
#7
|
|
Registered User
Join Date: Oct 2002
Location: Jackson, TN
Posts: 22
|
thanks, guiys.
i had forgotten i had posted here as well as FK.
will give it a try.
-myk
|
|
|
02-27-2003, 06:49 PM
|
#8
|
|
Registered User
Join Date: Oct 2002
Location: Jackson, TN
Posts: 22
|
hey, can you repost the FLA? I think you updated the SWF on the server but not the FLA..
I'd like to see how you scripted the one where the user CANNOT add or delete items from the list, but simply type and have the box search while they type.
A popular request back on FK.
thanks,
-myk
|
|
|
02-27-2003, 06:51 PM
|
#9
|
|
Master of Nothing
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
|
|
|
|
02-27-2003, 06:52 PM
|
#10
|
|
Master of Nothing
Join Date: Dec 2002
Location: San Diego, CA
Posts: 2,468
|
Done
|
|
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 03:56 PM.
///
|
|