Consultor Eletrônico



Kbase P19021: How to position a SmartSelect viewied as browser on the screen
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

GOAL:

How to position a SmartSelect viewied as browser on the screen

FIX:

You can customise the existing SmartSelect (src\adm2\dynselect.w) to override the browseHandler method. This method is fired just before the browser is viewed.
The new browseHandler method should looks something like the following:

PROCEDURE browseHandler :
/*------------------------------------------------------------------------------
Purpose: Super Override
Parameters:
Notes:
------------------------------------------------------------------------------*/

DEFINE INPUT PARAMETER phBrowseObject AS HANDLE NO-UNDO.

DEF VAR ctr AS HANDLE.

/* Code placed here will execute PRIOR to standard behavior. */

RUN SUPER( INPUT phBrowseObject).

/* Code placed here will execute AFTER standard behavior. */

/* phBrowseObject points to the smart dynamic browser,
therefore we need to find the containing window first. */
ctr = DYNAMIC-FUNCTION('getContainerSource':U IN phBrowseObject).

/* Now that I have the window handle, I can reposition it. */
RUN repositionObject IN ctr
( INPUT 10 /* DECIMAL */,
INPUT 100 /* DECIMAL */).

END PROCEDURE.

This will position your browers at row 10, column 100.