| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== SETPENWIDTH (set line draw thickness) ====== | [[setpenstyle set line draw style .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[setposition specify new control position .htm|{{btn_next_n.gif|Next page}}]] | | || **SETPENWIDTH(** [//width//] **)** {{blk2blue.jpg|blk2blue.jpg}} | **SETPENWIDTH** | Sets the current pen width. | | //Width// | An integer expression that specifies the pen's thickness, measured in dialog units (unless overridden by the THOUS, MM, or POINTS attribute on a REPORT). If omitted, the default (one pixel) is set. | The **SETPENWIDTH** procedure sets the current line draw thickness for use by all graphics procedures. The default is one pixel, which may be set with a //width// of zero (0). This procedure is valid in Clarion Win32 Windows, and also for REPORT structures in both Clarion Win32 and Clarion#. Every window has its own current pen width. Therefore, to consistently use the same pen (which does not use the default width setting) across multiple windows, the SETPENWIDTH statement should be issued for each window. **Example:** **MDIChild WINDOW('Child One'),AT(0,0,320,200),MDI,MAX,HVSCROLL** **         !window controls** **         END** ** CODE** ** OPEN(MDIChild)** ** SETPENCOLOR(000000FFh)        !Set blue pen color** ** SETPENSTYLE(PEN:dash)         !Set dashes for line style** ** ****SETPENWIDTH****(2)                !Set two dialog unit thickness** ** BOX(100,50,100,50,00FF0000h)  !Red box with thick blue dashed border** **See Also:** [[penwidth return line draw thickness .htm|PENWIDTH]]