Code: Select all
Enumeration
#Window_Main
#Editor_Log
EndEnumeration
Procedure PopulateEditor(Gadget)
Protected i
For i = 1 To 100000
AddGadgetItem(#Editor_Log, -1, "Esta é a string de número: " + Str(i))
Next i
EndProcedure
If OpenWindow(#Window_Main, 0, 0, 600, 400, "Populando EditorGadget com Thread", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
EditorGadget(#Editor_Log, 0, 0, WindowWidth(#Window_Main), WindowHeight(#Window_Main))
CreateThread(@PopulateEditor(), GadgetID(#Editor_Log))
Repeat
Define Event = WaitWindowEvent()
Select Event
Case #PB_Event_CloseWindow
Break
EndSelect
ForEver
EndIf



