Skip to main content
Version: 20 R6

VP SET TABLE THEME

History
ReleaseChanges
19 R8Added

VP SET TABLE THEME ( vpAreaName : Text ; tableName : Text ; options : cs.ViewPro.TableTheme )

ParameterTypeDescription
vpAreaNameText->4D View Pro area form object name
tableNameText->Table name
optionscs.ViewPro.TableTheme->Table theme properties to modify

Description

The VP SET TABLE THEME command modifies the current theme of the tableName.

In vpAreaName, pass the name of the 4D View Pro area and in tableName, the name of the table to modify.

In the options parameter, pass an object of the cs.ViewPro.TableTheme class that contains the theme properties to modify.

Example 1

You want to set a predefined theme to a table:

var $param : cs.ViewPro.TableTheme
$param:=cs.ViewPro.TableTheme.new()
$param.theme:="medium2"
VP SET TABLE THEME("ViewProArea"; "myTable"; $param)

Example 2

You want to have this alternate column rendering:

var $param : cs.ViewPro.TableTheme
$param:=cs.ViewPro.TableTheme.new()

// Enable the band column rendering
$param.bandColumns:=True
$param.bandRows:=False

// Create the theme object with header and column styles
$param.theme:=cs.ViewPro.TableThemeOptions.new()

var $styleHeader; $styleColumn; $styleColumn2 : cs.ViewPro.TableStyle

$styleHeader:=cs.ViewPro.TableStyle.new()
$styleHeader.backColor:="Gold"
$styleHeader.foreColor:="#03045E"
$param.theme.headerRowStyle:=$styleHeader

$styleColumn1:=cs.ViewPro.TableStyle.new()
$styleColumn1.backColor:="SkyBlue"
$styleColumn1.foreColor:="#03045E"
$param.theme.firstColumnStripStyle:=$styleColumn1

$styleColumn2:=cs.ViewPro.TableStyle.new()
$styleColumn2.backColor:="LightCyan"
$styleColumn2.foreColor:="#03045E"
$param.theme.secondColumnStripStyle:=$styleColumn2

VP SET TABLE THEME("ViewProArea"; "myTable"; $param)

See also

VP CREATE TABLE
VP Get table theme