While reading from a Sqlite database (500000 records)
my program updates 3 StringGadget, containing the
number of the record and other stuff.
Nothing appears in StringGadget but the last value.
Also if I modify my program in order to show me 1 value every 100 record readings.
The only effort program seems to be able to make
is managing database: only at the end it updates
my StringGadget (only last value, of course)
Can someone hint me anything?
Updating a Stringgadget while reading from SQLITE database
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
If you want your stringgadget to be updated, you have to handle the events. Note that it will slow down your loop.
Quick example :
Quick example :
Code: Select all
If OpenWindow(0, 450, 200, 400, 125, "Example", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
StringGadget(0, 32, 31, 344, 27, "0")
EndIf
;
For I = 0 To 10000
SetGadgetText(0, Str(I))
; Try with and without this line
While WindowEvent() : Wend
;
Next
;
Repeat
If WaitWindowEvent() = #PB_Event_CloseWindow
Break
EndIf
ForEver
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).