Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug in Combobox?
Message
De
17/05/2003 16:25:12
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00788447
Message ID:
00789757
Vues:
47
Garrett,

After more testing, I found that the "odd" behavior does NOT occur when filling the list using AddItem... If you would, please copy the following code into the INIT method of a simple form and then just drop two native VFP Comboboxes on the form named Combo1 and Combo2.
LOCAL i
CREATE CURSOR cTEST1 (TestFld C(10))
CREATE CURSOR cTEST2 (TestFld C(10))
FOR i = 1 TO 600
	IF i<=500
		INSERT INTO cTEST1 (TestFld) VALUES ('Test'+PADL(i,3,'0'))
	ENDIF
	INSERT INTO cTEST2 (TestFld) VALUES ('Test'+PADL(i,3,'0'))
ENDFOR

Thisform.Combo1.RowSource='cTest1.TestFld'
Thisform.Combo1.RowSourceType= 6
Thisform.Combo1.ListIndex=2

Thisform.Combo2.RowSource='cTest2.TestFld'
Thisform.Combo2.RowSourceType= 6
Thisform.Combo2.ListIndex=2
This code will create two cursors, cTEST1 with 500 rows and cTEST2 with 600 rows. Other than that, they are identical. But when you run the form and you open the list on the first combo, it works fine - that is, as the mouse hovers over the list, the appropriate item is highlighted. Do the same on Combo2 and I think you'll see that the behavior is different. Hovering the mouse over the dropped list does NOT highlight the appropriate item. In addition clicking on one of the items does the "shift-up" behavior I talked about in the original message. If you scroll the list using the up/down arrows, it clears the problem but try explaining that to a client ;)

The odd behavior occurs when the combo is filled based on a table or array (RowSourceType 3,5,6), the listindex is greater than 1, and the rowcount is greater than 503.

Thanks in advance for trying this out.
Al

>0. I just did an AddItem loop.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform