Consultor Eletrônico



Kbase P21874: How to dynamicly set the attributes of a smartbrowser?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   25/11/2003
Status: Unverified

GOAL:

How to dynamically set the attributes of a smartbrowser?

FIX:

Sample Syntax;

DEFINE VARIABLE hBrowse AS HANDLE NO-UNDO.
DEFINE VARIABLE hField AS HANDLE NO-UNDO.
DEFINE VARIABLE Readlogical AS LOGICAL NO-UNDO.

/*This is a dynamic function to get the handle to the browse then we get the handle to column 1*/
ASSIGN hBrowse = DYNAMIC-FUNCTION('getBrowseHandle':U IN h_bcustomer)
hField = hBrowse:GET-BROWSE-COLUMN(1).

/*In this example we toggle the read-only attribute however, any could be used inplace of read-only*/

ON CHOOSE OF BUTTON-1 IN FRAME fMain /* Read Only */
DO:

ASSIGN readlogical = FALSE = hField:READ-ONLY.
ASSIGN hField:READ-ONLY = readlogical.

END.