Consultor Eletrônico



Kbase P67224: How to change the default SmartToolBar File menu so that the
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/02/2004
Status: Unverified

GOAL:

How to change the default SmartToolBar File menu so that the 'ALT-F + X' exits the application rather than the default 'ALT-F + E'?

FACT(s) (Environment):

Windows

FACT(s) (Environment):

Progress 9.1D

FIX:

Following are two solutions for the desired change:

1. If the desired change applies to all toolbars, then assign the caption. This can be done from almost anywhere, but is probably best done after RUN SUPER in an initAction override in toolbarcustom.p.

DYNAMIC-FUNCTION('assignActionCaption':U, 'Exit','E&xit').

2. Another solution is to override the 'Exit' label, by customizing the toolbar and modify the adm2/custom/toolbarcustom.i to call the toolbarcustom.p. (Uncomment the RUN start-super-proc.) Add the function actionCaption in toolbarcustom.p and add the following:

FUNCTION ActionCaption RETURNS CHARACTER
( pcAction AS CHAR ) :
/*------------------------------------------------------------------------------
Purpose:
Notes:
------------------------------------------------------------------------------*/
IF pcAction = "Exit" THEN
RETURN "E&xit".
ELSE
RETURN SUPER(pcAction). /* Function return value. */

END FUNCTION.

Recompile toolbarcustom.p along with the toolbar object (adm2/dyntoolbar.w) and run the application.