#include "fivewin.ch"
#include "constant.ch"
Function main()
local oDlg,oFont,oBold
local aChk:={}
local aGetRuote:= array(11)
Local aRuote := {"Bari","Cagliari","Firenze","Genova",;
"Milano","Napoli","Palermo","Roma","Torino",;
"Venezia","Nazionale"}
local nRow:= 10
local nCol:= 5
local nInterlinea:= 20
local nBottom := 33
local nRight := 99
local nWidth := Max( nRight * DLG_CHARPIX_W, 180 )
local nHeight := nBottom * DLG_CHARPIX_H
For n= 1 to Len( aRuote)
aadd(aChk,{.f.,aRuote[n]})
next
DEFINE FONT oFont NAME "MS Sans Serif" SIZE 0, 14
DEFINE FONT oBold NAME "MS Sans Serif" SIZE 0, 12 BOLD
DEFINE DIALOG oDlg ;
SIZE nWidth, nHeight PIXEL TRUEPIXEL RESIZABLE ;
TITLE "colorize check" COLOR 0, CLR_WHITE FONT oFont
@ nRow, nCol CHECKBOX aGetRuote[1] VAR aChk[1][1];
PROMPT aRuote[1] SIZE 85, 20 PIXEL OF oDlg COLOR CLR_BLACK, CLR_WHITE ;
ON CHANGE colorize( aGetRuote[1], oDlg ) UPDATE
nRow+=nInterlinea
@ nRow, nCol CHECKBOX aGetRuote[2] VAR aChk[2][1];
PROMPT aRuote[2] SIZE 85, 20 PIXEL OF oDlg COLOR CLR_BLACK, CLR_WHITE ;
ON CHANGE colorize( aGetRuote[2], oDlg ) UPDATE
nRow+=nInterlinea
@ nRow, nCol CHECKBOX aGetRuote[3] VAR aChk[3][1];
PROMPT aRuote[3] SIZE 85, 20 PIXEL OF oDlg COLOR CLR_BLACK, CLR_WHITE ;
ON CHANGE colorize( aGetRuote[3], oDlg ) UPDATE
nRow+=nInterlinea
@ nRow, nCol CHECKBOX aGetRuote[4] VAR aChk[4][1];
PROMPT aRuote[4] SIZE 85, 20 PIXEL OF oDlg COLOR CLR_BLACK, CLR_WHITE ;
ON CHANGE colorize( aGetRuote[4], oDlg ) UPDATE
nRow+=nInterlinea
@ nRow, nCol CHECKBOX aGetRuote[5] VAR aChk[5][1];
PROMPT aRuote[5] SIZE 85, 20 PIXEL OF oDlg COLOR CLR_BLACK, CLR_WHITE ;
ON CHANGE colorize( aGetRuote[5], oDlg ) UPDATE
nRow+=nInterlinea
@ nRow, nCol CHECKBOX aGetRuote[6] VAR aChk[6][1];
PROMPT aRuote[6] SIZE 85, 20 PIXEL OF oDlg COLOR CLR_BLACK, CLR_WHITE ;
ON CHANGE colorize( aGetRuote[6], oDlg ) UPDATE
nRow+=nInterlinea
@ nRow, nCol CHECKBOX aGetRuote[7] VAR aChk[7][1];
PROMPT aRuote[7] SIZE 85, 20 PIXEL OF oDlg COLOR CLR_BLACK, CLR_WHITE ;
ON CHANGE colorize( aGetRuote[7], oDlg ) UPDATE
nRow+=nInterlinea
@ nRow, nCol CHECKBOX aGetRuote[8] VAR aChk[8][1];
PROMPT aRuote[8] SIZE 85, 20 PIXEL OF oDlg COLOR CLR_BLACK, CLR_WHITE ;
ON CHANGE colorize( aGetRuote[8], oDlg ) UPDATE
nRow+=nInterlinea
@ nRow, nCol CHECKBOX aGetRuote[9] VAR aChk[9][1];
PROMPT aRuote[9] SIZE 85, 20 PIXEL OF oDlg COLOR CLR_BLACK, CLR_WHITE ;
ON CHANGE colorize( aGetRuote[9], oDlg ) UPDATE
nRow+=nInterlinea
@ nRow, nCol CHECKBOX aGetRuote[10] VAR aChk[10][1];
PROMPT aRuote[10] SIZE 85, 20 PIXEL OF oDlg COLOR CLR_BLACK, CLR_WHITE ;
ON CHANGE colorize( aGetRuote[10], oDlg ) UPDATE
nRow+=nInterlinea
@ nRow, nCol CHECKBOX aGetRuote[11] VAR aChk[11][1];
PROMPT aRuote[11] SIZE 85, 20 PIXEL OF oDlg COLOR CLR_BLACK, CLR_WHITE ;
ON CHANGE colorize( aGetRuote[11], oDlg ) UPDATE
ACTIVATE DIALOG oDlg
return nil
Function colorize( o, w )
if eval( o:bSetGet )
o:nClrText := CLR_WHITE
o:nClrPane := CLR_BLUE
else
o:nClrText := CLR_BLACK
o:nClrPane := CLR_WHITE
endif
// try to comment the line below
* msginfo( "msgPaint :-))" )
return nil