Both replies I needed to implement.
I was trying to use a macro in the ACTION like this:
function anewbutton(parm1,Parm2,Parm3,Parm4)
N_Button= 'col'+ltrim(str(parm1))+'_B'
A_ct = 'virt_board.job_'+ltrim(str(Parm1))+'.caption'
DEFINE BUTTON &N_button
PARENT VIRT_BOARD
ROW Parm2
COL Parm3
WIDTH 80
HEIGHT 25
CAPTION parm4
ACTION virtbutton1(&A_ct)
FONTNAME "Arial"
FONTSIZE 9
TOOLTIP ""
FONTBOLD .T.
END BUTTON
return nil
So I changed the ACTION to
ACTION virtbutton1(Parm1)
and then changed the function virtbutton to:
function virtbutton1(parm1) /* Save last job button pushed */
lastBpushed := parm1
N_Button= 'col'+ltrim(str(parm1))+'_B'
lastJpushed = GETProperty("virt_board", N_button,"caption")
msgbox(N_button+' '+lastJpushed)
return nil
I had actually wrote a program to generate the code to make the buttons and put it in a file.ch
then included it inside the window declaration.
got to go , dentist appointment
Thank you.