Consultor Eletrônico



Kbase P11694: How to get widget value from its handle
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

GOAL:

How to get widget value from its handle

FIX:

Form fields don’t have a specific property that will directly retrieve their value from memory based on their handle. A buffer will have to be used.

The following example uses a OUTPUT TO command followed by a DISPLAY to pass the data to the screen buffer:

Define Temp-table tt-param
Field dat-ini As Date Format 99/99/9999
Field dat-fim As Date Format 99/99/9999.
def var tit-selecao as char format "x(9)" NO-UNDO.

form
tit-selecao no-label colon 2 skip(1)
tt-param.dat-ini colon 30 space(04) "|<>|" space(04) tt-param.dat-fim no-label
with stream-io no-box side-labels width 132 frame f-selecao.

Assign tit-selecao = "Sele&#231;&#227;o".
Def Var vHandle As Handle.
Assign vHandle = tit-selecao:Handle.

OUTPUT TO "null".
DISPLAY tit-selecao WITH frame f-selecao.
OUTPUT CLOSE.
Message vHandle:SCREEN-VALUE Skip vHandle:screen-value View-as Alert-box.
OS-DELETE VALUE("null").