Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  

XL.Format.SetFillPattern

Sets the fill pattern.

Component Version macOS Windows Linux Server iOS SDK
XL 3.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "XL.Format.SetFillPattern"; Book; Format; Value )   More

Parameters

Parameter Description Example
Book The reference to the workbook. Please use XL.LoadBook to load a file. $ref
Format The index of the format in the book to target. 0
Value The new setting. $value

Result

Returns OK or error.

Description

Sets the fill pattern.

None0
Solid1
50% Gray2
75% Gray3
25% Gray4
Horizontal Stripes5
Vertical Stripes6
Reverse Diagonal Stripes7
Diagonal Stripes8
Diagonal Cross Hatch9
Thick Diagonal Stripe9
Thin Horizontal Stripe11
Thin Vertical Stripe12
Thin Reverse Diagonal Stripe13
Thin Diagonal Stripe14
Thin Horizontal Cross Hatch15
Thin Diagonal Cross Hatch16
Gray 12P517
Gray 6P2518

see table of fill patterns here:
http://www.libxl.com/format.html#borderStyleTable#setFillPattern

Examples

Sets the fore color to red:

If [ MBS( "XL.Book.GetRGBMode"; $book) = 0 ]
      Set Variable [ $r; Value: MBS( "XL.Format.SetPatternForegroundColor"; $book; $format; 10) ]
Else
      Set Variable [ $c; Value: MBS( "XL.Color.Pack"; $book; 255; 0; 0) ]
      Set Variable [ $r; Value: MBS( "XL.Format.SetPatternForegroundColor"; $book; $format; $c) ]
End If
Set Variable [ $r; Value: MBS( "XL.Format.SetFillPattern"; $book; $format; 1 ) ]

See also

Created 18th August 2014, last changed 17th February 2015


XL.Format.SetBorderTopColor - XL.Format.SetFont

Feedback: Report problem or ask question.