Page 1 of 1

btnbmp cargo

Posted: Mon Mar 28, 2022 10:14 am
by Silvio.Falconi
I have some btnbmp and I use cargo to save a state

for k=1 to 11
for j=1 to 13
@ nrow,ncol BTNBMP oPrezziBtn[k+j] PROMPT transform(aImporti[j],"999.99") ;
SIZE nSizeW,nSizeH FLAT PIXEL OF oDlg NOROUND

oPrezziBtn[k+j]:cargo := {k,j,1}

obviously at each cargo[3] value the btnbmp has its own color -at the beginning it has white

but i want to restore the new color

ACTIVATE DIALOG oDLG CENTER ;
ON INIT ( Restorecolors( oPrezziBtn))

function Restorecolors( oBtn)
local nCol := oBtn:cargo[1]
local nRow := oBtn:cargo[2]

? nCol
return nil


On function Restorecolors( oBtn) give me error

Error description: Error BASE/1004 No exported method: CARGO


HOw I can resolve it ?

Re: btnbmp cargo

Posted: Mon Mar 28, 2022 11:07 am
by karinha
Silvio, always POST complete example and with declared Variables.

Silvio, siempre POST ejemplo completo y con Variables declaradas.

Regards, saludos.

Re: btnbmp cargo

Posted: Mon Mar 28, 2022 11:31 am
by Silvio.Falconi
I correct
I changed the arrays to oPricesBtn: = ARRAY (11, 13)

:) sorry