ID: Q127017
The information in this article applies to:
FoxPro supports a limited number of line styles as demonstrated by the program in this article.
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
Last Reviewed: June 27, 1995