Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example defines two font configurations and uses them to set the printed header and footer text.

C++

// Create a font as Arial, size 10, bold, no italics,
// underline, no strikethrough and save it as font #1
lstrcpy(font1,"/fn\"Arial\"/fz\"10\"/fb1/fi0/fu1/fk0/fs1");
// Create a font as Times, size 20, no bold, italics, no
// underline, strikethrough and save it as font #2
lstrcpy(font2,"/fn\"Times\"/fz\"20\"/fb0/fi1/fu0/fk1/fs2");
// Recall font configurations and set the header and footer text
wsprintf(buf,"%s%s/f1This is font #1/n/f2This is font #2",font1, font2);
m_Spread.SetPrintFooter(buf);
m_Spread.SetPrintHeader(buf);

Visual Basic

' Create a font as Arial, size 10, bold, no italics,
' underline, no strikethrough and save it as font #1
font1 ="/fn""Arial""/fz""10""/fb1/fi0/fu1/fk0/fs1"
' Create a font as Times, size 20, no bold, italics, no
' underline, strikethrough and save it as font #2
font2 ="/fn""Times""/fz""20""/fb0/fi1/fu0/fk1/fs2"
' Recall font configurations and set the header and footer text
buf = font1 & font2 & "/f1This is font #1/n/f2This is font #2"
fpSpread1.PrintFooter = buf
fpSpread1.PrintHeader = buf

Copyright © GrapeCity, inc. All rights reserved.