Given the following sample data:
data ={ {"a", "b", "c", "d", "e"}, {1, 2, 3, 4, 5}, {11, 12, 13, 14, 15}, {21, 22, 23, 24, 25} };
And the following function to create a custom table view:
(and you can refer to Mr.Wizard 's advanced solution for custom tabular views . Ultimately, I will also manipulate the options that he has proposed, for now)
DataSampleX[data_, linesNumber_, range1_, range2_, color1_, color2_, color3_] := Grid[ Join[ {Range[range1, range2]}, {Map[Rotate[Text[#], 90 Degree] &, data[[1, range1 ;; range2]]]}, data[[2 ;; linesNumber, range1 ;; range2]] ], Background -> {{{{color1, color2}}, {1 -> color3}}}, Dividers -> {All, {1 -> True, 2 -> True, 3 -> True,0 -> True}}, ItemSize -> {1 -> Automatic, Automatic}, Alignment -> Top, Frame -> True, FrameStyle -> Thickness[2], ItemStyle -> {Automatic, Automatic, {{1, 1}, {1, Length[data]}} ->Directive[FontSize -> 15, Black, Bold]} ];
I would like to use Manipulate or Dynamic to display parts of my data using the above. This allows you to select the range of the column that I want to display, the number of rows to display, as well as color.
Below is my unfinished attempt.
PopupMenu[Dynamic[range1], Range[1, Length@data [[1]] - 1, 1]] PopupMenu[Dynamic[range2], Range[2, Length@data [[1]], 1]] PopupMenu[Dynamic[linesNumber], Range[2, Length@data [[All, 1]] - 1, 1]] Dynamic[DataSampleX[data, linesNumber, range1, range2, LightBlue, LightGray, LightYellow]]


How can I use setter to update the color value?
Is it possible to have this in the Manipulation window?
Any other suggestion to make this effective look good is welcome.
- EDIT: what can I do now thanks to the Belisarius solution below:
