Consultor Eletrônico



Kbase P13536: How to enable and disable tabs in a Dynamics Folder Programmatically
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/19/2008
Status: Unverified

GOAL:

How to enable and disable tabs in a Dynamics Folder Programmatically

FACT(s) (Environment):

Dynamics 2.0A

FIX:

In Dynamics 2.0A, there is a TabEnabled attribute.

These are the steps to assign the value of this attribute programmatically.
These steps are for an independent window which has a folder with 10 tabs.

1. Add the 'TabEnabled' attribute to the Object Instance of the folder
(afspfoldrw.w) for the independent window in the Repository - no need to assign a value since it will be assigned in the code.

2. Create a super procedure for the window and add the 'initializeObject' procedure with the following code:

/* disable tabs 1 through 8 and enable the 9th and 10th */
DEFINE VARIABLE TabVal AS CHARACTER NO-UNDO.
TabVal = "no|no|no|no|no|no|no|no|yes|yes".

DEFINE VARIABLE hFolder AS HANDLE NO-UNDO.
hFolder = DYNAMIC-FUNCTION('getContainerTarget':U IN TARGET-PROCEDURE).

/* assigning the value directly as follows is allowed */
/*
dynamic-function('SETTabEnabled' IN hFolder, INPUT "no|no|no|no|no|no|no|no|yes|yes").
*/

/* or using a variable */
DYNAMIC-FUNCTION('SETTabEnabled' IN hFolder, INPUT TabVal).

RUN SUPER.

END PROCEDURE.