[adm2-dev] enabling a button in dyntoolbar

Posted by LegacyUser on 10-Sep-2002 07:29

Hello,

I come and ask for your knowledge again.

We added a button in the toolbar following John Sadd Paper on toolbar

customization.

Here what we did :

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"

"Excel"

"exit.bmp":U

"PUBLISH":U

"exportExcel":U

"FUNCTION":U

).

toolbarcustom.p :

setbuttons (override) :

DEFINE INPUT PARAMETER pcState AS CHAR NO-UNDO.

DYNAMIC-FUNCTION

('enableActions':U IN TARGET-PROCEDURE, 'Excel':U).

/* In our case we always invoke the standard setButtons, but in

other cases the local version might not want to RUN SUPER if the

case has already been dealt with here. */

RUN SUPER(pcState).

END PROCEDURE.

When we draw the toolbar and access to instance properties, we get the new

defined action under 'Function' group.

But when we run our smartwindow, despite the unconditionnal

'enableactions' inside SetButtons (which is effectively executed) the

button is not enabled.

If you have any clue, please tell us.

Thanks in advance.

Sylvestre SEGURON

To unsubscribe, e-mail: dev-unsubscribe@adm2.possenet.org

For additional commands, e-mail: dev-help@adm2.possenet.org

All Replies

This thread is closed