Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example sets up the display of pages in an fpSpreadPreview control. The pages display two across and two down, with 150 twips between pages, and the widths and colors of the border page and shadow as set.

C++

// Connect fpSpread control to fpSpreadPreview control
m_Preview.SetHWndSpread(m_Spread.GetHWnd());
// Display multiple pages
m_Preview.SetPageViewType(PageViewTypeMultiplePages);
// Display two pages across and two pages down
m_Preview.SetPageMultiCntH(2);
m_Preview.SetPageMultiCntV(2);
// Specify space between pages
m_Preview.SetPageGutterH(150);
m_Preview.SetPageGutterV(150);
// Specify border color, width: cyan RGB(0, 255, 255)
m_Preview.SetPageBorderColor(0x00FFFF00);
m_Preview.SetPageBorderWidth(50);
// Specify shadow color, width: dark cyan RGB(0, 128, 128)
m_Preview.SetPageShadowColor(0x00808000);
m_Preview.SetPageShadowWidth(4);

Visual Basic

Sub Form_Load()
    ' Connect fpSpread control to fpSpreadPreview control
    fpSpreadPreview1.hWndSpread = fpSpread1.hWnd
    ' Display multiple pages
    fpSpreadPreview1.PageViewType = PageViewTypeMultiplePages
    ' Display two pages across and two pages down
    fpSpreadPreview1.PageMultiCntH = 2
    fpSpreadPreview1.PageMultiCntV = 2
    ' Specify space between pages
    fpSpreadPreview1.PageGutterH = 150
    fpSpreadPreview1.PageGutterV = 150
    ' Specify border color, width: cyan, RGB(0, 255, 255)
    fpSpreadPreview1.PageBorderColor = &H00FFFF00
    fpSpreadPreview1.PageBorderWidth = 50
    ' Specify shadow color, width: dark cyan, RGB(0, 128, 128)
    fpSpreadPreview1.PageShadowColor = &H00808000
    fpSpreadPreview1.PageShadowWidth = 4
End Sub

Copyright © GrapeCity, inc. All rights reserved.