Xbasic

Office::FillPattern Enumeration

Description

Available fill patterns. Used with the Office::Format object.

Fill Pattern
Description
Office::FillPattern::None

Value = 0

Office::FillPattern::Solid

Value = 1

Office::FillPattern::Gray50

Value = 2

Office::FillPattern::Gray75

Value = 3

Office::FillPattern::Gray25

Value = 4

Office::FillPattern::HorizontalStripe

Value = 5

Office::FillPattern::VerticalStripe

Value = 6

Office::FillPattern::ReverseDiagonalStripe

Value = 7

Office::FillPattern::DiagonalStripe

Value = 8

Office::FillPattern::DiagonalCrossHatch

Value = 9

Office::FillPattern::ThickDiagonalCrossHatch

Value = 10

Office::FillPattern::ThinHorizontalStripe

Value = 11

Office::FillPattern::ThinVerticalStripe

Value = 12

Office::FillPattern::ThinReverseDiagonalStripe

Value = 13

Office::FillPattern::ThinDiagonalStripe

Value = 14

Office::FillPattern::ThinHorizontalCrossHatch

Value = 15

Office::FillPattern::ThinDiagonalCrossHatch

Value = 16

Office::FillPattern::Gray12Point5

Value = 17

Office::FillPattern::Gray6Point25

Value = 18

Example

This example demonstrates setting the fill pattern for a group of cells in an Office::Spreadsheet.

dim document as Office::ExcelDocument
		dim format as Office::Format = document.addFormat()

		format.FillPattern = Office::FillPattern::ReverseDiagonalStripe
		format.PatternBackgroundColor = Office::Color::DarkRed_CL
		format.PatternForegroundColor = Office::Color::Yellow
		dim spreadsheet as Office::Spreadsheet
		spreadsheet = document.addSheet("Fill Pattern")

		spreadsheet.setFormat(1,1,10,10,format)
		
		if (document.save("c:/excelDemo/fillPattern.xlsx") <> .t.) then
			showvar(document.CallResult,"Error Saving Document")
		end if