But how do I filter out items from the dropdown that don't start with the
text typed in the edit?
--
np: Daedelus - Quiet Now / Invention
> I'm using this tip to automatically select the string in the
> combobox when typing.
> http://www.swissdelphicenter.ch/torry/showcode.php?id=157
You may want to consider using Windows' own IAutoComplete interface instead.
It provides that same kind of functionality at the OS layer for you.
Gambit
Yeah, but it looks like thats just some expensive MRU and i need to manage
items on the fly. Nevermind, I'll do it manually. Thanks for the tip.
--
foobar is offline
> Yeah, but it looks like thats just some expensive MRU
> and i need to manage items on the fly.
IAutoComplete allows you to provide your own string list for it to filter
with, for instance you could have it filter using the ComboBox's current
Items list. Which is exactly what it sounds like you are trying to
accomplish.
Gambit
Yeah but it uses registry as a storage, it's COM(plicated), i don't have
much control over it and I don't want any dependancy BS across
updates/SPs/Win versions. A custom control is already well under way and I'm
already convinced that it's gonna be at least 10x faster than by using that
interface.
Thanks!
Vedran
> Yeah but it uses registry as a storage
No, it doesn't.
> it's COM(plicated)
So is just about everything else in the OS at the Shell layers. That
doesn't mean they should be ignored, though. There is alot of functionality
available. Why re-invent things from scratch that have been part of the OS
for years?
> i don't have much control over it
Yes, you do.
> and I don't want any dependancy BS across updates/SPs/Win versions.
IAutoComplete has been around for a very long time. There are no
compatibility problems.
> A custom control is already well under way and I'm already
> convinced that it's gonna be at least 10x faster than by using
> that interface.
Not really. I use IAutoComplete myself (wrote my own component wrapper for
it) and it is very fast and very stable.
Gambit
>
> "lhaymehr" <my.name.@google.email.service.xxx> wrote in message
> news:4816...@newsgroups.borland.com...
>
>> Yeah but it uses registry as a storage
>
> No, it doesn't.
Yeah, I was looking at IAutoComplete::Init definition and just seeing
pwszReg{...} put me off. I think the Registry is the worst thing in Windows
and my bad experiences with it are *really* bad. It's not as scary now on
NTFS, but I had several "HIVE" BSODs even on NT happen and it sucks. All it
ever gets from me are autorun entries and for sole reason because users like
to rearange their Start Menu folders directly.
>> it's COM(plicated)
>
> So is just about everything else in the OS at the Shell layers. That
> doesn't mean they should be ignored, though. There is alot of
> functionality available. Why re-invent things from scratch that have been
> part of the OS for years?
Because I think the whole design of it is bad. I think COM is one of the
failed - if it was meant to be a unified and 'simple' framework, for shell
only or otherwise - steps in the path to .NET which ultimately isn't that
close to perfect either, but closer TBH. And when COM breaks it takes a
whole lot of stuff down with it on a seemingly minor defect.
Bottom line, I try to stay away from it for now and learn and understand how
to do basic things well. I know that's not the best direction cause I'm
probably _just_ reinventing the wheel in a lot of cases, but it's so damn
fun!
And I really think I'm not knowledgeable enough for tinkering with COM stuff
yet.
>> i don't have much control over it
>
> Yes, you do.
Well, I had some new ideas in the meantime and I haven't seen AutoComplete
being used in a way I have in mind..
>> and I don't want any dependancy BS across updates/SPs/Win versions.
>
> IAutoComplete has been around for a very long time. There are no
> compatibility problems.
At least not for now :>
It's Shell. It's bound to be compatibility problems!
>> A custom control is already well under way and I'm already
>> convinced that it's gonna be at least 10x faster than by using
>> that interface.
>
> Not really. I use IAutoComplete myself (wrote my own component wrapper
> for it) and it is very fast and very stable.
Well, godspeed!
Now, I got some source from http://codebot.org/delphi/?doc=9451 and I'll
look into it. Seems it is what I was initially looking for, but as I say, I
got some new ideas in the meantime which include completion of items which
aren't the first word, Tabbing, Icons, multiline autosuggest items, multiple
dropdowns, per item checkboxes, etc. I really just properly started with
Delphi with this app and as it stands I think I'm never gonna finish it. :)
IAutoComplete just sounds really boring, you know? ;)
cheers,
Vedran
--
np: kid 606 - sugarcoated / resillence
> Yeah, I was looking at IAutoComplete::Init definition and just
> seeing pwszReg{...} put me off.
You can ignore that parameter for most things.
Gambit