PDA

View Full Version : search in a listbox


Ruud Jonk
12-15-2004, 01:42 AM
He, I am making a little project, and now i have the problem that i want to search a listbox, an if the word i have searched for is in the listbox, it wil select that colum. Does anyone know how to do this?

Greatz

Ruud

sferguson
12-15-2004, 03:08 AM
You could use the SQLite plug-in to store your original list in a database, query that list, then return the results to the list box for display.

Ruud Jonk
12-15-2004, 03:28 AM
well, im kind a newby at with ams and know nothing about databeses, so i hope there is a easy way for this.

But thanks for your reply

sferguson
12-15-2004, 04:07 AM
Well, for what it's worth... AMS has sooooo many killer capabilities and tool built in that I too (generally on a weekly basis :) ) find myself in the newbie club with regards to some type of scripting or method for building this or that.

While it may seem daunting at first blush, the database route might be simpler than it "sounds". But first, two questions:
A) Can you describe your project with a bit more detail and context?
B) Do you have the SQLite plug-in?

Ruud Jonk
12-15-2004, 04:17 AM
in the project, the listbox items are movie names, when you click on the movie, it opens a page with a cover of the movie as a page.
So the function i would have is to search te movie´s in the listbox to check if a certian movie is in my list. So i know if i have that movie or not.
I don´t have any plugins, because i just started using asm for a few weeks.

Ruud

JimS
12-15-2004, 04:34 AM
Check out the ListBox.FindItem action. I think it will give you what you are after. :)

Ruud Jonk
12-15-2004, 04:43 AM
Thanks for your reply, but do you have a little sample code so that i can see how i haf to combine the code with an inputbox to put in the word i want to search for an than when i click the search button, it wil do the search and if it found anything, it will select the column in the listbox containing the words of the search

Thanks for your help.

sferguson
12-15-2004, 04:55 AM
Yep, JimS has the ticket! I'm currently knee-deep in a SQLite related project, and with a hammer in my hand - everything looks like a nail :o

Ruud, let me see if I can post a litte sample project for you in just a bit.

Corey
12-15-2004, 05:25 AM
I love that old saying, "when your only tool is a hammer, everything starts to look like a nail". Always been one of my faves and so very true... :yes

sferguson
12-15-2004, 05:37 AM
Ruud,

Well... I have a handy little sample project for you, but... it doesn't seem to want to upload.

Hey, Corey, any special tips about uploading files (zip file) along with a post? Each time I hit "Upload", the little pop-up window returns "Page cannot be displayed".

Corey
12-15-2004, 05:44 AM
Sounds like something on your end blocking pop-up windows. Works OK here, plus we haven't heard of any other reports of that. Could be your anti-virus, maybe a firewall? Couple thoughts anyhow...

sferguson
12-15-2004, 06:28 AM
Well, dang-nab-it! ...tried it again from another machine, and it's still nothing-doing. It's gotta be my firewall, but I'm not sure exactly what about that pop-up window's upload function would be so unique. I haven't had any problems with similar type upload scenarios before.

Ruud, hang in there. I don't mean to tease you, I'll still see if I can get the file posted.

Ruud Jonk
12-15-2004, 06:32 AM
oke thanks for trying, i have a lot of time today anyway

sside
12-15-2004, 08:14 AM
Hallo Ruud,

Hier heb je een voorbeeld.

Groeten

Ruud Jonk
12-15-2004, 08:28 AM
Bedankt, dit is bijna helemaal wat ik nodig heb, het enige was dat wanneer je bijvoorbeeld een film zoals the day after tomorrow in de lijst heb staan, je de hele film naam moet intypen, hoe ik het eigenlijk wil hebben is dat wanneer je zeg maar alleen tomorrow intypt hij naar de eerste springt die dat in de zin heeft, en wanneer we after tomorrow intyp hij naar het item springt die het alle 2 in zich heeft zeg maar. Dit omdat het nogal wel eens verschilt bij sommigen hoe ze de film schrijven.

Zou je hier misschien ook nog de oplossing op weten?

sside
12-15-2004, 08:34 AM
Dit is hem Ruud.

Groeten

Ruud Jonk
12-15-2004, 08:43 AM
Kijk dit is precies wat ik nodig had. Heel erg bedankt voor alle hulp.

Hopelijk kan ik jou ook een keer van dienst zijn.

Met vriendelijke groet

Ruud

Stefan_M
12-15-2004, 11:41 AM
Searching in Listbox with '?' and '*'


Stefan_M

sferguson
12-15-2004, 10:45 PM
Well, maybe it's a "day late and a dollar short" :rolleyes , but I finally snuck in a few minutes to get my "personal issues" worked out with the uploading snag.

Anywhooooo, here's the sample project ...simply for the sake of posterity.

Corey
12-15-2004, 10:47 PM
"Personal issues". Hee! :) :yes

Ruud Jonk
12-16-2004, 01:18 AM
thanks for helping me out its working fine nou. exactly hou ik want it.

Ruud