
FB II Compiler
PG PRO
Debugging
Memory
System
Mathematics
Resources
Disk I/O
Windows
Controls
Menus
Mouse
Keyboard
Text
Fonts
Drawing
Sound
Clipboard
Printing
Communication
ASM
|
TEXT
Fill an Edit Field with an array of strings
Well I don't know about real programmers but I have used BLOCKMOVE something like this:
DataHndl& = FN NEWHANDLE(32760) 'handle the max size of an edit field contents
offset& = 0
FOR i = 1 TO gTotalArrayStrings%
temp$ = dataStringArray$(i)
lngth = LEN(temp$)
BLOCKMOVE @temp$ + 1, [DataHndl&] + offset&, lngth
offset& = offset& + lngth
NEXT i
EDIT FIELD _theEditField
textHndl& = TEHANDLE(_theEditField) 'The field to display the data
CALL TEINSERT([dataHndl&], offset&, textHndl&) 'Puts it in the field
DEF DISPOSEH (dataHndl&) 'Need to clear memory
temp$ = CHR$(13) 'Forces the text to update and set the scroll bars
TEKEY$ = temp$
|