Hi Antonio Linares
See this portion ( FUNC test_button(n) )
The contents of the 'oField[n]:cCapture' does not change.
Also neither the 'oField[n]:SetColor( CLR_WHITE, CLR_YELLOW )' Changes
When it is done how.
It is kind to a question always and answer back, it gives and the unit only it is grateful.
Code: Select all
#define CR chr(13)
Function main()
publ oWnd, oField := array(250), count := 1
DEFINE WINDOW oWnd
for i := 1 to 50
for j := 1 to 5
cCap := CR + " " + CR + alltrim(tran(n,"999"))+" used"
@ (i*15), (j*30) BUTTONBMP oField[count] PROMPT cCap OF oWnd SIZE 10, 10 PIXEL
oField[count]:nStyle := nOr( oField[count]:nStyle, 8192 )
oField[count]:bAction := GenBlock( count )
count += 1
next
next
ACTIVATE WINDOW oWnd
return nil
//------------------------------------------------
func GenBlock( n )
RETU { || test_button( n ) }
//------------------------------------------------
FUNC test_button(n)
oField[n]:cCaption := CR + "Not" + CR + alltrim(tran(n,"999"))+ CR + " used"
oField[n]:SetColor( CLR_WHITE, CLR_YELLOW )
oField[n]:Refresh()
RETU NIL