Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example creates a sheet with five columns. The text in each column illustrates the different ways text can be oriented in a sheet.

C++

m_Spread1.MaxCols(5);
m_Spread1.GrayAreaBackColor(0x00FFFFFF);
m_Spread1.Col(-1);
m_Spread1.Row(-1);
m_Spread1.TypeEditMultiLine(TRUE);
m_Spread1.RowHeight(1,75);
// define column 1 - VLTR
m_Spread1.ColWidth(1,12);
m_Spread1.Col(1);
m_Spread1.Row(SPREADHEADER);
m_Spread1.Text("VERTICAL LTR");
m_Spread1.Col(1);
m_Spread1.Row(1);
m_Spread1.TypeTextOrient(TypeTextOrientVerticalLTR);
m_Spread1.Text("Vertical Left To Right");
// define column 2 - VRTL
m_Spread1.ColWidth(2,12);
m_Spread1.Col(2);
m_Spread1.Row(SPREADHEADER);
m_Spread1.Text("VERTICAL RTL");
m_Spread1.Row(1);
m_Spread1.TypeTextOrient(TypeTextOrientVerticalRTL);
m_Spread1.Text("Vertical Right to Left");
// define column 3 - invert
m_Spread1.ColWidth(3,7);
m_Spread1.Col(3);
m_Spread1.Row(SPREADHEADER);
m_Spread1.Text("INVERT");
m_Spread1.Row(1);
m_Spread1.TypeTextOrient(TypeTextOrientInvert);
m_Spread1.Text("Rotate 180 degrees");
// define column 4 - rotate up
m_Spread1.ColWidth(4,7);
m_Spread1.Col(4);
m_Spread1.Row(SPREADHEADER);
m_Spread1.Text("UP");
m_Spread1.Row(1);
m_Spread1.TypeTextOrient(TypeTextOrientUp);
m_Spread1.Text("Rotate 270 degrees");
// define column 5 - rotate down
m_Spread1.ColWidth(5,7);
m_Spread1.Col(5);
m_Spread1.Row(SPREADHEADER);
m_Spread1.Text("DOWN");
m_Spread1.Row(1);
m_Spread1.TypeTextOrient(TypeTextOrientDown);
m_Spread1.Text("Rotate 90 degrees");

Visual Basic

fpSpread1.MaxCols = 5
fpSpread1.GrayAreaBackColor = RGB(255, 255, 255)
fpSpread1.Col = -1
fpSpread1.Row = -1
fpSpread1.TypeEditMultiLine = True
fpSpread1.RowHeight(1) = 75
' define column 1 - VLTR
fpSpread1.ColWidth(1) = 12
fpSpread1.Col = 1
fpSpread1.Row = SpreadHeader
fpSpread1.Text = "VERTICAL LTR"
fpSpread1.Col = 1
fpSpread1.Row = 1
fpSpread1.TypeTextOrient = TypeTextOrientVerticalLTR
fpSpread1.Text = "Vertical Left To Right"
' define column 2 - VRTL
fpSpread1.ColWidth(2) = 12
fpSpread1.Col = 2
fpSpread1.Row = SpreadHeader
fpSpread1.Text = "VERTICAL RTL"
fpSpread1.Row = 1
fpSpread1.TypeTextOrient = TypeTextOrientVerticalRTL
fpSpread1.Text = "Vertical Right to Left"
' define column 3 - invert
fpSpread1.ColWidth(3) = 7
fpSpread1.Col = 3
fpSpread1.Row = SpreadHeader
fpSpread1.Text = "INVERT"
fpSpread1.Row = 1
fpSpread1.TypeTextOrient = TypeTextOrientInvert
fpSpread1.Text = "Rotate 180 degrees"
' define column 4 - rotate up
fpSpread1.ColWidth(4) = 7
fpSpread1.Col = 4
fpSpread1.Row = SpreadHeader
fpSpread1.Text = "UP"
fpSpread1.Row = 1
fpSpread1.TypeTextOrient = TypeTextOrientUp
fpSpread1.Text = "Rotate 270 degrees"
' define column 5 - rotate down
fpSpread1.ColWidth(5) = 7
fpSpread1.Col = 5
fpSpread1.Row = SpreadHeader
fpSpread1.Text = "DOWN"
fpSpread1.Row = 1
fpSpread1.TypeTextOrient = TypeTextOrientDown
fpSpread1.Text = "Rotate 90 degrees"

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.