Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoid search in Listview
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
SAMBA Server
Database:
Visual FoxPro
Divers
Thread ID:
00953343
Message ID:
00953378
Vues:
18
>I am using the Listview control and would like to stop the movement/search when a key is pressed. For example if the control has focus and I type in the letter "E" it move to items with starting with the letter E. Any ideas?

Borislav suggested a method for Listbox.

You're post mentions "listview". If you are (indeed) using the OCX Listview then you could do it this way:
myCustomer.DBF
cCustKey c(10) && Populate with a SYS(2015) or company key
cCustName c(40) && Index on this "cCustName"

*In your list view, have the nodekey set to cCustKey, and the Text property
*set to cCustName.

*When you press the key (cKeyValue)
set exact off
if seek(cKeyValue,"myCustomer","cCustName")
   cListViewNodeKey=cCustKey
   myForm.MyListView.ItemClick(myForm.MyListView.ListItems(cListViewNodeKey))
else
   * Nothing on file
endif
set exact on
Imagination is more important than knowledge
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform