Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ComboBox Row Limitations
Message
De
27/02/2009 05:01:22
 
 
À
26/02/2009 09:05:45
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01384116
Message ID:
01384475
Vues:
168
>>>>>We thought it was our class, but then we threw a default Foxpro ComboBox on a form and set the RowSourceType to Fields, the RowSource to a cursor (tried a table also) and then started playing around with selecting different values. It is 2 column and we can consistently make it break. By choosing a row near the top of the list, then choosing one around number 250 in the list, it will not change the value. If we choose something near the bottom, it will. If we have one chosen at the bottom, then choose one near the top, it will not change the value. We are very tired of testing this, but it does seem to happen more when the display drops "Up" (near the bottom of the screen) then the normal "Down" direction. It seems to only happen when the cursor or table has (somewhere around) 250 records or more. Anyone seen this type of behavior?
>>>>
>>>>
>>>>Combobox control - A selection does not work correctly when a row source exceeds approximately 512 items.
>>>>
>>>>in
>>>>
>>>>http://support.microsoft.com/?scid=kb%3Ben-us%3B824071&x=15&y=12
>>>
>>>But we are using VFP9 SP2
>>>
>>>From your link:
>>>
>>>Visual FoxPro 8.0 Service Pack 1 (SP1) contains the following fixes:
>>>.
>>>.
>>>.
>>>Combobox control - A selection does not work correctly when a row source exceeds approximately 512 items.
>>>
>>>
>>>Did I misunderstand?
>>
>>Sure! But is sure that it is fixed ?
>
>Do you know something specific, or just throwing thoughts out there? I'm looking for a way to work around the issue if possible.

I remember some issue with RowSourceType = Alias.

But the 512 issue is fixed in VFP9 SP2 ( example with 200000 array's items work )
A issue exists with negative values ...
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show


DEFINE CLASS form1 AS form


	Top = 0
	Left = 0
	Height = 250
	Width = 453
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT combo1 AS combobox WITH ;
		BoundColumn = 2, ;
		ColumnCount = 2, ;
		RowSourceType = 5, ;
		Height = 24, ;
		Left = 96, ;
		Style = 2, ;
		Top = 60, ;
		Width = 156, ;
		BoundTo = .T., ;
		Name = "Combo1"


	ADD OBJECT text1 AS textbox WITH ;
		ControlSource = "thisform.Combo1.Value", ;
		Height = 23, ;
		InputMask = "99999999", ;
		Left = 264, ;
		Top = 60, ;
		Width = 156, ;
		Name = "Text1"


	ADD OBJECT combo2 AS combobox WITH ;
		BoundColumn = 2, ;
		ColumnCount = 2, ;
		RowSourceType = 5, ;
		Height = 24, ;
		Left = 96, ;
		Style = 2, ;
		Top = 96, ;
		Width = 156, ;
		BoundTo = .T., ;
		Name = "Combo2"


	ADD OBJECT text2 AS textbox WITH ;
		ControlSource = "thisform.Combo2.Value", ;
		Height = 23, ;
		InputMask = "99999999", ;
		Left = 264, ;
		Top = 96, ;
		Width = 156, ;
		Name = "Text2"


	ADD OBJECT combo3 AS combobox WITH ;
		BoundColumn = 2, ;
		ColumnCount = 2, ;
		RowSourceType = 5, ;
		Height = 24, ;
		Left = 96, ;
		Style = 2, ;
		Top = 132, ;
		Width = 156, ;
		BoundTo = .T., ;
		Name = "Combo3"


	ADD OBJECT text3 AS textbox WITH ;
		ControlSource = "thisform.Combo3.Value", ;
		Height = 23, ;
		InputMask = "99999999", ;
		Left = 264, ;
		Top = 132, ;
		Width = 156, ;
		Name = "Text3"


	PROCEDURE combo1.Init
		ADDPROPERTY(this,"aItems[256,2]")
		FOR j=1 TO ALEN(this.aItems,1)
			This.aItems[m.j,1]="Items"+STR(m.j)
			This.aItems[m.j,2]=m.j+20
		NEXT
		this.RowSource = "m.this.aItems"
		this.Value = 34
	ENDPROC


	PROCEDURE combo1.Valid
		thisform.Text1.Refresh
	ENDPROC


	PROCEDURE combo2.Valid
		thisform.Text2.Refresh
	ENDPROC


	PROCEDURE combo2.Init
		ADDPROPERTY(this,"aItems[256,2]")
		FOR j=1 TO ALEN(this.aItems,1)
			This.aItems[m.j,1]="Items"+STR(m.j)
			This.aItems[m.j,2]=-m.j
		NEXT
		this.RowSource = "m.this.aItems"
		this.Value = -34 && with negatives you can select but set Value doesn't find Value into RowSource
	ENDPROC


	PROCEDURE combo3.Valid
		thisform.Text3.Refresh
	ENDPROC


	PROCEDURE combo3.Init
		ADDPROPERTY(this,"aItems[100000,2]")
		FOR j=1 TO ALEN(this.aItems,1)
			This.aItems[m.j,1]="Items"+STR(m.j)
			This.aItems[m.j,2]=m.j
		NEXT
		this.RowSource = "m.this.aItems"
		this.Value = 234
	ENDPROC


ENDDEFINE
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform