- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Coloring selective cells
Hi there, how do I color the cells red for values that are lower than the limits? Thanks.
dt = New Table( "Marks",
Add Rows( 2 ),
New Column( "Name", Character, Nominal, Set Values( {"Peter", "Leslie"} ) ),
New Column( "Limits",
Numeric,
Continuous,
Format( "Best", 12 ),
Set Values( [20, 30] )
),
New Column( "Column 1",
Numeric,
Continuous,
Format( "Best", 12 ),
Set Values( [10, 15] )
),
New Column( "Column 2",
Numeric,
Continuous,
Format( "Best", 12 ),
Set Values( [30, 40] )
),
New Column( "Column 3",
Numeric,
Continuous,
Format( "Best", 12 ),
Set Values( [20, 55] )
),
New Column( "Column 4",
Numeric,
Continuous,
Format( "Best", 12 ),
Set Values( [53, 24] )
),
Set Row States( [0, 1] )
)
fail = dt << Get Rows Where( :Column 1 < :Limits );
:Column 1 << color cells(Red, fail);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Coloring selective cells
You have to color by column. This code will do the trick. The color "73" is a bit lighter than "Yellow"
for (i = 1, i <= ncols(dinout), i++,
column(dinout, i) << Color Cells( {73, {40}} );
);
- « Previous
-
- 1
- 2
- Next »