Property: BackgroundColor for 2DTableHeaderFooterDefaultSettings
- Updated2024-09-12
- 1 minute(s) read
DIAdem REPORT > Properties > Property: BackgroundColor for 2DTableHeaderFooterDefaultSettings
Property: BackgroundColor for 2DTableHeaderFooterDefaultSettings
Specifies the background color of the headers and footers in a 2D table in DIAdem REPORT.
Set oBackgroundColor = Object.BackgroundColor
Object | 2DTableHeaderFooterDefaultSettings Object with this property |
oBackgroundColor | BackgroundColor Returned object |
The following example generates a 2D table with two columns and assigns a green background color to the headers:
VBScript | Python |
Dim oMy2DTable, oMyPosition, oMyHeaderSettings, oMyColumn1, oMyColumn2 Call Report.NewLayout() Set oMy2DTable = Report.ActiveSheet.Objects.Add(eReportObject2DTable,"My2DTable") Set oMyPosition = oMy2DTable.Position.ByBorder oMyPosition.Top = 30 oMyPosition.Bottom = 20 oMyPosition.Left = 20 oMyPosition.Right = 30 Set oMyHeaderSettings = oMy2DTable.Settings.Header oMyHeaderSettings.Height = 20 oMyHeaderSettings.Title1 = "@@ChnName(CurrChnNo)@@" oMyHeaderSettings.Title2 = "@@ChnDim(CurrChnNo)@@" oMyHeaderSettings.Font.Size = 4 oMyHeaderSettings.BackgroundColor.ColorIndex = eColorIndexGreen Set oMyColumn1 = oMy2DTable.Columns.Add(e2DTableColumnChannel) oMyColumn1.Channel.Reference = "[1]/[1]" Set oMyColumn2 = oMy2DTable.Columns.Add(e2DTableColumnChannel) oMyColumn2.Channel.Reference = "[1]/[2]" Call Report.Refresh()