Subject: | Re: Something like DropList
| Date: | Sun, 16 Jun 2019 21:10:59 -0800
| From: | Peter <peter@removespamwhiteknight.email>
| Newsgroups: | pnews.paradox-programming
|
This is an implementation from Liz McQuire. Works like a charm! Thanks Liz.
"FilenameSearch" = undefined field (the one you type in)
tbfName = table frame for customer names
FileName1 = defined field (customer name) in tbfName
The following method is placed in keyChar event
method keyChar(var eventInfo KeyEvent)
if eventinfo.vCharCode() = VK_Space then
return
endIf
loIgnore = isIgnoreCaseInLocate()
ignoreCaseInLocate(True)
liCursorPos = self.CursorPos
stSearch = self.substr(1,liCursorPos) + ".."
if FileName1.locatePattern(2,stSearch) then
self.value = FileName1.value
self.CursorPos = liCursorPos
tbfName.locate("Filename",self.value)
else
msginfo("","didn't find text string")
beep()
self.value = self.substr(1,liCursorPos - 1)
self.cursorPos = liCursorPos - 1
endIf
ignoreCaseInLocate(loIgnore)
Peter
On 06/14/2019 05:11 AM, modridirkac wrote:
> I know, I have seen it before, but can not find it.
>
> I want to make something like DropList, but to be dynamic.
> When I step into edit field and start typing, I would like to see a
> "subset"
> of options in "drop list". And select one option, with mouse or up-down
> keys.
>
> So with every character entered, there would be less and less items in
> "drop down".
>
> Anybody got some sample?
>
> Thx, Jure
|