FoxPro Line Styles Explained

Last reviewed: June 27, 1995
Article ID: Q127017
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.6 and 2.6a

SUMMARY

FoxPro supports a limited number of line styles as demonstrated by the program in this article.

MORE INFORMATION

FoxPro supports five main line styles. Styles 1 through 4 are the combi- nations of short dashes, long dashes, and dots.

Style   Line Definition
  1     dot-dot-dot-dot-dot
  2     long dash-long dash-long dash-long dash
  3     short dash-dot-short dash-dot-short dash
  4     short dash-dot-dot-short dash-dot-dot-short dash
  5     solid line

If you examine the line definition code inside an SPR, you may see that FoxPro will use a line style of 8, which is an undocumented line style. Line styles 5 on up are all solid lines, as the code sample will show.

The other parameter of significance is identified below as PenWidth. This value has no bearing on the width of line styles 1 through 4. However, it does affect the width of the primary line style 5 (the solid line). Any value higher than 6 will be treated as a value of 1.

**------------------------------------------------------------------**

** Program : LINETEST                                               **

** Function: Shows all the supported line widths and styles         **
**------------------------------------------------------------------** PUSH KEY CLEAR ON ESCAPE DO Stop IN LINETEST FOR PenWidth = 1 TO 6
  CLEAR
  HPosition = 10
  FOR LineStyle = 1 TO 8
    @ HPosition,10.000 TO HPosition,70.000 ;
      PEN PenWidth, LineStyle STYLE "1"
    SHOW GETS
    HPosition = HPosition + 1
    WAIT WINDOW "Pen width : "+Alltrim(str(penwidth))+ ;
                "  Line style #: " + Alltrim(str(Linestyle))
  ENDFOR
ENDFOR

PROCEDURE Stop CANCEL


Additional reference words: FoxWin 2.60 2.60a LINE STYLES
KBCategory: kbprg kbcode
KBSubcategory: FxprgGeneral


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: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.