Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox numeric values and speedsearch
Message
 
 
À
02/12/2004 10:48:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00966403
Message ID:
00966413
Vues:
6
Got to thinking that would cause some indexing order issues. When you index the character formname column, the order would be:

1
12
125
126
13
2
3
4
50

unless you LPADded the names with zeros. I don't know right off what would happen to your speed search if the index was then created on the VAL() of the formname if you did not LPAD the names.

>I have a form that contains a listbox. The listbox displays forms and their form number in two separate fields. The user can sort the listbox by either the form name or the form number. When the user sorts by form number, the following code is run:
>
>	SET ORDER TO TAG FORMNAME
>	THISFORM.LIST1.ROWSOURCE='formname,DESC'
>	THISFORM.LIST1.COLUMNWIDTHS = '130,300'
>	THISFORM.LIST1.REQUERY()
>	THIS.CAPTION = "Sort By Form Name"
>	THISFORM.LABEL2.LEFT = 200
>	Thisform.label1.caption = 'Form Number'
>	THISFORM.Label2.caption = "Form Name"
>
>
>The field formname is really a numeric field of n(10,0).
>
>The problem occurs with speed search in the listbox when the form number is the sort order (formname). If I have the following forms:
>
>1
>2
>3
>4
>12
>13
>50
>125
>126
>etc
>
>If the pointer is on 1 and the user presses 125 quickly, the pointer goes to 2. If the pointer is positioned on 12 and presses 125 quickly, the pointer goes back up to 2, etc. It does not work like it does with alpha characters. For instance, How to jump from 1 to 125?
>
>Any ideas?
>
>TIA,
>Tracy
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform