Just Another AutoComplete for string gadgets

Share your advanced PureBasic knowledge/code with the community.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: Just Another AutoComplete for string gadgets

Post by srod »

Thanks Lloyd.
I may look like a mule, but I'm not a complete ass.
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5494
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: Just Another AutoComplete for string gadgets

Post by Kwai chang caine »

I love reading the conversation between two MASTERS, as the school, i understand nothing, but, i love when even. :mrgreen:

It's so beautifull ....all this hieroglyphs lines of code, the watchmaking of programming in fact. :shock:
Sometime, when i see your works, i retrieve the eyes of KCC chiildren, before his christmas tree :shock: :D

Thank you NETMAESTRO, for allowing me to relive that sensation 8)
If one day, i come back to earth, maybe I will ask myself incarnate into a frog :roll:
ImageThe happiness is a road...
Not a destination
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Re: Just Another AutoComplete for string gadgets

Post by rsts »

I've added a deleteString procedure for my use.

I'm also looking (unsuccessfully, so far) at Mr dige's request
>But how about a possibility
to select one item with keyboard keys like jump to the
choice box with tabkey and then select one with up and down key?

cheers
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Just Another AutoComplete for string gadgets

Post by netmaestro »

I've added a deleteString procedure for my use.
PM me the procedure and I'll put it in the main posted code. It's a good idea and one I was planning to get to.
BERESHEIT
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Just Another AutoComplete for string gadgets

Post by netmaestro »

Updated today, please see first post for code and details.
BERESHEIT
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Just Another AutoComplete for string gadgets

Post by netmaestro »

Update today, check first post for new code and details.
BERESHEIT
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: Just Another AutoComplete for string gadgets

Post by srod »

...sans 405 thousand extra bytes of bloat.
Now you put that bloat right back you hear! This is Windows we are talking about and I likes my bloatedness!

:)
I may look like a mule, but I'm not a complete ass.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Just Another AutoComplete for string gadgets

Post by netmaestro »

hehe :D

Actually I'm squinting at the gadget element of the pstr() list. I'm not convinced anymore that it's needed as each object is tied to a gadget anyway, why specify a gadget when *this\pstr() only points to the list that was attached to this gadget?
BERESHEIT
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Re: Just Another AutoComplete for string gadgets

Post by rsts »

I've noticed a delay when closing the window, both in the demo and in my incorporating application (it also happens on a minimization of the window).

Commenting out the SetWindowHookEX eliminates the delay.

Is this merely a by-product of the hook?

Is there any way to eliminate it (besides eliminating the hook?)

It makes it appear as if the program has hung on a minimize and/or close.
User avatar
ar-s
Enthusiast
Enthusiast
Posts: 344
Joined: Sat Oct 06, 2007 11:20 pm
Location: France

Re: Just Another AutoComplete for string gadgets

Post by ar-s »

First, thanks a lot for this usefull lib :)

That will be cool if the element from the list could be automaticly get the focus on a mouse over.
Like that, we 'll just have to use one click (left or right) instead of 2.

----edit-----

Another very usefull stuff to add.
If there is nothing write in the stringgadget() and if the user make a #PB_EventType_LeftDoubleClick, the popup list could be open by defaut with the "a" list.

thanks again for your work
~Ar-S~
My Image Hoster for PB users
My webSite (french) with PB apps : LDVMULTIMEDIA
PB - 3.x / 5.7x / 6 - W11 x64 - Ryzen 7 3700x / #Rpi4

Code: Select all

r3p347 : 7ry : un71l d0n3 = 1
User avatar
em_uk
Enthusiast
Enthusiast
Posts: 366
Joined: Sun Aug 08, 2010 3:32 pm
Location: Manchester UK

Re: Just Another AutoComplete for string gadgets

Post by em_uk »

Also I have tried to get this working on a ComboBox but no joy!
----

R Tape loading error, 0:1
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4790
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Just Another AutoComplete for string gadgets

Post by Fangbeast »

When I came up with the idea of tapping SQLite for an easy search of text matches, it didn't occur to me that there might be a penalty. In fact, there was. The penalty came in the form of 405 kb being added to the executable size, just for autocompletes.
I could really use this with SQLite as it's in all my projects so the penalty doesn't worry me.

When I load my data form, i'd like to load up an autocomplete list for each gadget that needs it. At the moment, I do this for comboboxes but it looks ugly as I cannot 'flatten' and colour combos properly and autocomplete stringgadgets would look nice.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Post Reply