Microsoft KB Archive/299507

= FIX: Disabled Label On a Form Only Wraps One of Two Colors =

Article ID: 299507

Article Last Modified on 10/16/2002

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q299507



SYMPTOMS
When you have a label on a form in Visual FoxPro (VFP) 5.0 or 6.0, and the label is disabled (Enabled = .F.) and its caption is wrapped (WordWrap = .T.), the label may appear to have extra words in its caption.



CAUSE
Only one of the two colors that make up the 3D disabled effect actually wraps.



STATUS
This problem was corrected in Visual FoxPro version 7.0 for Windows.



Steps to Reproduce Behavior
  In VFP 5.0 or 6.0, paste the following code in a new program. *!* Q299507 FIX: Disabled Label On a Form Only Wraps One of Two Colors LOCAL loForm loForm = CREATEOBJECT(&quot;frmLblDemo&quot;) loForm.lblDemo.ENABLED = .F. loForm.SHOW(1)

DEFINE CLASS frmLblDemo AS FORM ADD OBJECT lblDemo AS DemoLabel ENDDEFINE

DEFINE CLASS DemoLabel AS LABEL CAPTION = 'This is a demo' WORDWRAP = .T.   HEIGHT   = 100 WIDTH   = 82 TOP     = 100 LEFT    = 100 ENDDEFINE  Save and run the code (the name is unimportant).

When this code is run, a new form appears. The form has one object, a label, which is disabled and has its WordWrap property set to .T.. Using the &quot;Windows Standard&quot; color scheme in Microsoft Windows, in VFP 5.0 and 6.0 the word &quot;demo&quot; appears twice in the label caption: once on the first line (in gray) and once on the second line (in white). However, the caption property of the label does not contain extra text.

Keywords: kbbug kbfix kboop kbcodesnippet kbvfp700fix KB299507

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.