cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Jackie_
Level VI

Custom shade alternate rows in table box

Hi,

 

Is there a way to custom-shade alternate rows for the table box, not the data table box?

 

Jackie__2-1719336139604.png

I want to shade green instead of dark gray

Jackie__3-1719336150222.png

 

 

Names Default To Here( 1 );
New Window( "Mountains",
	tb = Table Box(
		String Col Box( "Mountain", {"K2", "Delphi", "Kilimanjaro", "Grand Teton"} ),
		Number Col Box( "Elevation (meters)", {8611, 681, 5895, 4199} )
		
	)
);
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Custom shade alternate rows in table box

I don't think you can do it directly with Table Box. You could do the coloring by datatable (example of this below) or col box

Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(4),
	Compress File When Saved(1),
	New Column("Mountain", Character, "Nominal", Color Cells({44, {2, 4}}), Set Values({"K2", "Delphi", "Kilimanjaro", "Grand Teton"})),
	New Column("Elevation (meters)", Numeric, "Continuous", Format("Best", 12), Color Cells({44, {2, 4}}), Set Values([8611, 681, 5895, 4199]))
);

nw = New Window("",
	dt << get as report
);
-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: Custom shade alternate rows in table box

I don't think you can do it directly with Table Box. You could do the coloring by datatable (example of this below) or col box

Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(4),
	Compress File When Saved(1),
	New Column("Mountain", Character, "Nominal", Color Cells({44, {2, 4}}), Set Values({"K2", "Delphi", "Kilimanjaro", "Grand Teton"})),
	New Column("Elevation (meters)", Numeric, "Continuous", Format("Best", 12), Color Cells({44, {2, 4}}), Set Values([8611, 681, 5895, 4199]))
);

nw = New Window("",
	dt << get as report
);
-Jarmo
Jackie_
Level VI

Re: Custom shade alternate rows in table box

This works. Thanks Jarmo

Craige_Hales
Super User

Re: Custom shade alternate rows in table box

see Custom Table Calculator . I think it used to work better, I had to play with the color just now in JMP 18 to see any green.

<<backgroundcolor( RGB Color( 235, 255, 235 ) )

worked better than

<<backgroundcolor( RGB Color( 245, 255, 245 ) )

I'm not sure why it works, looking back at it. I think the light gray interacts with the background green color.

every other row is very pale green.every other row is very pale green.

Craige