Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ListBox and slow releasing forms
Message
From
18/08/2001 21:59:10
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00543960
Message ID:
00545930
Views:
11
>Has anyone else noticed that if you have a ListBox with a ColumnCount of 2 or more showing a cursor or table of about 750+ records, that if you scroll all the way to the bottom using the mouse or page down through the list, that the form takes an inordinate amount of time to release? If you move to the bottom of the list with the thumb, no problem. There was no problem with this in VFP 6 at all, only in VFP 7 (Build 9262)

Hadn't noticed, but I was able to duplicate the behavior with the following example.
PUBLIC oform1

RELEASE globaln1
PUBLIC globaln1, globaln2
oform1=NEWOBJECT("form1")
oform1.Show

globaln2 = SECONDS() - globalN1
?GLOBALN2

DEFINE CLASS form1 AS form


	DoCreate = .T.
	Caption = "Form1"
	WindowType = 1
	Name = "Form1"


	ADD OBJECT list1 AS listbox WITH ;
		ColumnCount = 2, ;
		RowSourceType = 2, ;
		RowSource = "MyCursor", ;
		Height = 170, ;
		Left = 100, ;
		Top = 14, ;
		Width = 100, ;
		Name = "List1"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 205, ;
		Left = 100, ;
		Height = 27, ;
		Width = 84, ;
		Cancel = .T., ;
		Caption = "Close", ;
		Name = "Command1"


	PROCEDURE Load
		CREATE CURSOR MyCursor (C1 C(30), C2 C(30))
		FOR lnI = 1 TO 800
			INSERT INTO MyCursor (C1, C2) VALUES ("hello" + STR(lnI), "goodbye" + STR(lnI) )
		NEXT lni
	ENDPROC


	PROCEDURE command1.Click
		globalN1 = SECONDS()
		THISFORM.RELEASE
	ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
With thumb I get times about .030 and .020. With page down or mouse I get .331, .731, .781,.741 and so on. In 6.0 I get consistently about .020 and .010 in all cases. Maybe there's enough there to post an error report.

FWIW I see a difference with 500 records, and I don't see any difference if I don't go all the way to the bottom of the list.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform