How To Have a Multiple-Line Caption on a Command Button

Last reviewed: January 10, 1997
Article ID: Q156085
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 5.0

SUMMARY

Visual FoxPro 5.0 has a new WordWrap property for command buttons that allows you to create command buttons with multiple-line captions.

MORE INFORMATION

Use the following steps to create multiple-line captions for your command buttons:

  1. Drop a command button on a form. Do not adjust its size.

  2. Set the caption to the following string:

          This is a real long caption to see if this works
    

  3. Set the WordWrap property of the command button to .T.

  4. Set the AutoSize property to .T.

Visual FoxPro adjusts the command button's size vertically to accommodate the caption text. If you adjust the width of the button manually, the vertical size adjusts. You cannot manually adjust the vertical size of the button. In some cases it may appear that there is a blank line at the top and bottom of the button. Set the AutoSize property to false to adjust the size of the button vertically. Now you can remove the extra line.


KBCategory: kbtool kbhowto
KBSubcategory: FxtoolFormdes
Additional reference words: 5.00 kbdsd VFoxWin word wrap



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 10, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.