BUG: SHOW GET Does Not Refresh Number of Elements (134638)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
This article was previously published under Q134638 SYMPTOMS
A screen converted from a previous version of FoxPro to a Visual FoxPro
form doesn't display added items when both of the following conditions are
met:
- The original screen has a list box that is populated from an array.
- The original screen has an event procedure (such as a command button
click procedure) that adds items to the array, and then refreshes the
contents of the list with a SHOW GETS command.
CAUSE
The converter defines the list box with a "number of elements" property.
That definition is exercised in the LOAD event of the form or formset.
Visual FoxPro's converter does not insert the appropriate command to
refresh the list box's "number of elements" property when the array size
changes.
WORKAROUND
The VALID code of the converted command button adds an element to the
array, and executes a SHOW GETS command. Immediately before the SHOW GETS
command, insert a command to update the number of elements as in this
example:
ThisForm.Pageframe1.Page1.<listbox>.NumberOfElements=ALEN(<arrayname>)
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article. We are researching this problem
and will post new information here in the Microsoft Knowledge Base as it
becomes available.
Modification Type: | Major | Last Reviewed: | 5/7/2003 |
---|
Keywords: | kbBug KB134638 kbAudDeveloper |
---|
|