Hi, as you mentioned I followed steps indicated in John Sadd toolbar paper just to add a new button (equivalent to his Print button) into the FUNCTION group.
I modified as indicated actioncustom (over of initAction) toolbarcustom (over of setButtons).
The button effectively appears but never get to be enabled (despite an unconditionnal call to enableActions for this action in SetButtons).
Here is the complete code I wrote :
actioncustom.p :
initaction (override) :
DEF VAR xcColumns AS CHAR INIT
"Name,Caption,Image,Type,OnChoose,Parent":U.
&SCOP dlmt + CHR(1) +
RUN SUPER.
DYNAMIC-FUNCTION ('defineAction':U IN TARGET-PROCEDURE,
"Excel":U,
xcColumns,
"Excel" {&dlmt}
"Excel" {&dlmt}
"exit.bmp":U {&dlmt}
"PUBLISH":U {&dlmt}
"exportExcel":U {&dlmt}
"FUNCTION":U
).
toolbarcustom.p :
setbuttons (override) :
DEFINE INPUT PARAMETER pcState AS CHAR NO-UNDO.
DYNAMIC-FUNCTION
('enableActions':U IN TARGET-PROCEDURE, 'Excel':U).
RUN SUPER(pcState).
END PROCEDURE.
Thanks in advance.

I modified as indicated actioncustom (over of initAction) toolbarcustom (over of setButtons).
The button effectively appears but never get to be enabled (despite an unconditionnal call to enableActions for this action in SetButtons).
Here is the complete code I wrote :
actioncustom.p :
initaction (override) :
DEF VAR xcColumns AS CHAR INIT
"Name,Caption,Image,Type,OnChoose,Parent":U.
&SCOP dlmt + CHR(1) +
RUN SUPER.
DYNAMIC-FUNCTION ('defineAction':U IN TARGET-PROCEDURE,
"Excel":U,
xcColumns,
"Excel" {&dlmt}
"Excel" {&dlmt}
"exit.bmp":U {&dlmt}
"PUBLISH":U {&dlmt}
"exportExcel":U {&dlmt}
"FUNCTION":U
).
toolbarcustom.p :
setbuttons (override) :
DEFINE INPUT PARAMETER pcState AS CHAR NO-UNDO.
DYNAMIC-FUNCTION
('enableActions':U IN TARGET-PROCEDURE, 'Excel':U).
RUN SUPER(pcState).
END PROCEDURE.
Thanks in advance.