v12.0 (2014)
Gets the specified cell's background color.
Color GridData.GetCellBackgroundColor( Int32 in_lCol, Int32 in_lRow ); |
oReturn = GridData.GetCellBackgroundColor( Column, Row ); |
Color used to draw the specified cell's background.
import win32com.client from win32com.client import constants as C propName = "TheProperty" gridDataName = "TheGrid" siProperty = Application.ActiveSceneRoot.AddProperty( "CustomProperty", False, propName ) gridData = siProperty.AddGridParameter(gridDataName).Value gridData.ColumnCount = 3 gridData.RowCount = 3 for row in range( 3 ): gridData.SetRowLabel( row, "Row %d"%row ) for col in range ( 3 ): if row == 1: gridData.SetColumnLabel( col, "Col %d"%col ) gridData.SetCell( col, row, "%d,%d"%( col, row ) ) Application.InspectObj( siProperty ) # Set third row background color to Blue color = gridData.GetCellBackgroundColor( 0, 2 ) color.Red = 0 color.Green = 0 color.Blue = 255 for col in range(3): gridData.SetCellBackgroundColor( col, 2, color ) # Log the first column cell colors for row in range(3): color = gridData.GetCellBackgroundColor( 0, row ) Application.LogMessage("Color for (%d,%d) = (%d, %d, %d)"%( 0, row, color.Red, color.Green, color.Blue ) ) |