I am experiencing frustration in trying to populate my ListView control at runtime and retain the ability to close my form. I have been able to duplicate my issue with a simplified project.
I have a form in VFP 6 with a ListView control and three buttons.
Button 1 is my "Quit" with simply a
in the click method.
Buttons 2 and 3 populate my ListView control with the same data, but via different means.
Button2 click method contains code:
Button3 click method contains code:
my main.prg contains simply:
Both buttons will populate my ListView control correctly, but if I populate my ListView control using Button3 (with the For/Next loop), then my form doesn't disappear after clicking my "Quit" button. However, if I populate my ListView control using Button2 (hard coded values supplied), then my form will disappear when clicking the "Quit" button.
Any ideas before I run out of hair??
I have a form in VFP 6 with a ListView control and three buttons.
Button 1 is my "Quit" with simply a
Code:
this.parent.release
Buttons 2 and 3 populate my ListView control with the same data, but via different means.
Button2 click method contains code:
Code:
With This.Parent.OleListView.ListItems
loListItem = .Add(,chr(34) + "1" + chr(34),"1")
loListItem = .Add(,chr(34) + "2" + chr(34),"2")
loListItem = .Add(,chr(34) + "3" + chr(34),"3")
EndWith
Button3 click method contains code:
Code:
for x=1 to 3
With This.Parent.OleListView.ListItems
KeyToAdd = chr(34) + allt(str(x)) + chr(34)
TextToAdd = allt(str(x))
loListItem = .Add(,KeyToAdd,TextToAdd)
EndWith
next
my main.prg contains simply:
Code:
Do Form ListViewTest
Read Events
Both buttons will populate my ListView control correctly, but if I populate my ListView control using Button3 (with the For/Next loop), then my form doesn't disappear after clicking my "Quit" button. However, if I populate my ListView control using Button2 (hard coded values supplied), then my form will disappear when clicking the "Quit" button.
Any ideas before I run out of hair??