Hi,
How can I create dynamically an extent FILL-IN?
DEFINE VARIABLE hFillIn AS HANDLE NO-UNDO.
create FILL-IN hFillIn
assign
frame = frame {&frame-name}:handle
name = 'FIL-165'
column = 20
row = 2
hidden = NO
sensitive = YES
extent = 10 --> That's not possible
.
Thanks in advance.
Jag
extent = 10* --> That's not possible
EXTENT is not a property of the FILL-IN widget.
Just create 10 fill-in widgets (and store the handles in an array if you like).
but we can set extent of a variable viewed as fill-in when static...right ?
DEFINE VARIABLE cName AS CHARACTER VIEW-AS FILL-IN EXTENT 4 NO-UNDO.
DISPLAY cName.
but we can set extent of a variable viewed as fill-in when static...right ?
Exactly - but it's variable viewed as 4 fill-in's, 4 different handles... not one handle with and array...
you can "fake" it by the following:
DEFINE VARIABLE hFillIn AS HANDLE EXTENT 10 NO-UNDO.
DEF VAR i AS INT NO-UNDO.
DO i = 1 TO EXTENT(hfillin):
create FILL-IN hFillIn[i]
assign
frame = frame {&frame-name}:handle
name = 'FIL-165'
column = 1
row = 2 + i
hidden = NO
sensitive = YES
.
END.
you can "fake" it by the following:
Like I said, store the handles in an array if you like.
Thanks a lot for your answers.
I have created FILL-IN dynamically with do i = 1 to extent() and stored the handle in an temp-table because the number of FILL-IN is not always the same depending on the configuration.
define temp-table ttWidget no-undo
field cWidget as character
field iOrder as integer
field hWidget as handle
field cDataType as character
field cInitValue as character
field iFunktion as integer
field lIsExtent as logical
field iIndex as integer
index Main is primary unique cWidget iIndex
index Order iOrder ascending
.
Jag
Not knowing your exact use case and Progress version, but a dynamically sized array might be more lightweight than a temp-table.
DEFINE VARIABLE hFillIns AS HANDLE EXTENT .
/* later */
EXTENT (hFillIns) = 42 .