color the cells of the xbrowse
Posted: Tue Apr 19, 2022 9:33 pm
I have this array
I would like to visualize with colors
1) equal numbers (from column 7 to 16) on the same row
2) same numbers (from column 7 to 16) on different rows
when the numbers are colored, I also want to color the columns relating to the headers
example "1-4" I want to color the number of columns 1 and 4
the test
I would like to visualize with colors
1) equal numbers (from column 7 to 16) on the same row
2) same numbers (from column 7 to 16) on different rows
when the numbers are colored, I also want to color the columns relating to the headers
example "1-4" I want to color the number of columns 1 and 4
the test
- Code: Select all Expand view
- #include 'fivewin.ch'
#include 'xbrowse.ch'
function Main()
local oWnd, oBrw, oFont
local aData := { ;
{"XXX", 53, 29, 22, 70, 39, 82, 75,33,2,51,9,68,2,61,19 }, ;
{"KKK", 15, 21, 60, 38, 44, 36, 75,53,59,81,59,65,8,14,82 }, ;
{"TTT", 54, 4, 56, 77, 79, 58, 20,41,43,60,81,83,43,45,66 } }
DEFINE FONT oFont NAME 'TAHOMA' SIZE 0,-20 BOLD
DEFINE WINDOW oWnd
* @ 0,0 XBROWSE oBrw OF oWnd AUTOCOLS ARRAY aData ;
* CELL LINES FASTEDIT FONT oFont
@ 0,0 XBROWSE oBrw OF oWnd PIXEL NOBORDER;
COLS 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;
HEADERS "Ruote", "1°", "2°", "3°", "4°", "5°", "1-2" ,"1-3","1-4","1-5","2-3","2-4","2-5","3-4","3-5","4-5";
SIZES 150,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45 ;
ARRAY adata ;
CELL LINES
oBrw:CreateFromCode()
oWnd:oClient := oBrw
ACTIVATE WINDOW oWnd
RELEASE FONT oFont
return nil