Antonio Linares wrote: Fri May 09, 2025 11:37 am
Dear Silvio,
Typicall case to use a detached local:
Code: Select all | Expand
FOR nIndex := 1 TO Min( nFields, 5 ) // Limita a 5 checkbox come da specifica
IF Len( ::aFields[nIndex] ) >= 2
@ nRow, nCol CHECKBOX ::aControls[nIndex] ;
VAR ::aCheckboxes[nIndex] ;
PROMPT ::aFields[nIndex][2] ;
OF ::oDlg ;
SIZE 90, 20 ;
PIXEL ;
COLOR CLR_BLACK, RGB(235, 243, 245) ;
FONT ::oFontBold ;
::aControls[ nIndex ]:bChanged = GenChangeBlock( ::aControls[ nIndex ], nIndex )
nCol += 100
ENDIF
If nIndex==5
EXIT
Endif
NEXT
function GenChangeBlock( oCbx, nIndex )
return { || oCbx:ChageSizeBrw( nIndex ) }
::aControls[ nIndex ]:bChange := GenChangeBlock( ::aControls[ nIndex ], nIndex )
make me error
Code: Select all | Expand
Error occurred at: 05/09/25, 14:19:59
Error description: Error BASE/1004 Message not found: TCHECKBOX:CHAGESIZEBRW
Args:
[ 1] = O TCHECKBOX
Stack Calls
===========
Called from: ../../../tobject.prg => __ERRRT_SBASE( 0 )
Called from: ../../../tobject.prg => TCHECKBOX:ERROR( 0 )
Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
Called from: ../../../tobject.prg => TCHECKBOX:MSGNOTFOUND( 0 )
Called from: ../../../tobject.prg => TCHECKBOX:CHAGESIZEBRW( 0 )
Called from: Tfiltro.prg => (b)GENCHANGEBLOCK( 104 )
Called from: .\source\classes\checkbox.prg => TCHECKBOX:CLICK( 153 )
Called from: .\source\classes\control.prg => TCHECKBOX:HANDLEEVENT( 18
I made
::aControls[nIndex]:bchange := ::EvalBlock(nIndex)
METHOD EvalBlock(n) CLASS TFiltro
local nCopy := n
return { || ::ChangeSizeBrw(nCopy ) }
and seem run ok only I have other problems now
on ::ChangeSizeBrw(nIndex ) nIndex is 1 but the if I make xbrowser ::aCheckboxes it show all false and only last true
but it is bad beacuse I click on first checkbox and I must have the first .t. and not .f.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com