Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 143247 - Last Review: September 30, 2003 - Revision: 3.1
FIX: Scrolling Edit Window Causes Incorrect Highlighting
This article was previously published under Q143247
When you use the EDIT command to add or modify data in a table, the field
may highlight incorrectly. This causes data entry problems if the DOWNARROW
key is pressed to go to the next field instead of the ENTER key. This
affects numeric, double, integer and currency fields. All other field types
are processed correctly even though the highlight doesn't seem to cover the
entire field.
When using the EDIT command, you need to use a :W= and the FIELDS clause to
properly highlight the numeric, double, currency, and integer fields when
the user presses the DOWNARROW key. For example:
EDIT FIELDS field1, field2 :W = numwhen()
FUNCTION numwhen
KEYBOARD '{CTRL+A}'
NOTE: The CTRL+A or select all functionality will only work if the system
menu is active in the application or in Visual FoxPro.
Microsoft has confirmed this to be a problem in the Microsoft products
listed at the beginning of this article. This problem has been fixed in
Visual FoxPro 5.0 for Windows.
In numeric fields, because they are right justified, the numbers aren't
selected, so any numbers entered are appended to the front of existing
numbers as long as the DOWNARROW key is used to move to the next field. The
only workaround found was to use the FIELDS clause, list all fields, use a
:W=, and use the following in the WHEN function to select the entire field.
The currency field behaves differently from the other fields. If the
currency field has 0.0000 as its value, the problem will not occur. If the
currency field already has data in it, the problem will occur. The
additional data is preappended to the current data. For example, if the
current data is 20.0000 and you want to change it to 30, the new value will
be 3020.0000 unless you use :W= to highlight the entire field.
Also, if the last field in the EDIT window is a currency field and you try
to change that value for the last record in the table, the value will
change to zero - not the value you typed in. To work around this problem,
use the FIELDS list to make sure that the currency field is not the last
field in the table or permanently change the structure of the table.
Steps to Reproduce Problem
- Issue the following commands in the Command Window:
USE SAMPLES\DATA\CUSTOMER
EDIT
- Make your EDIT window show the first record and only part of the second
record.
- Use the arrow keys to move down through each field.
- Once you start scrolling, you will notice that the highlight is no
longer highlighting the entire field.
- Change the amount in the MaxOrdAmt field to something different, and
then press the DOWNARROW key.
APPLIES TO
- Microsoft Visual FoxPro 3.0b Standard Edition
| kbbug kbfix kbvfp500fix KB143247 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate
Be the first to leave feedback, to help others about this knowledge base
article.
(Optional) Name
(Optional)
Public URL Or Email
Comments
No
HTML -- Text Only Please