I have a small app I'm working on that has a rather intensive for...next loop, during this loop I update several text gadgets with information for the user.
The problem is that if the window is obscured in any way the window doesn't get refreshed and only the text gadgets I'm updating show.
I was wondering if there is a way to force certain gadgets or the entire window to repaint/refresh its self without doing and WaitWindowEvent(), as I don't want the rest of the application accessible during the operation.
I'm using PB v4 Beta 5
Thanks for any help in advance.
			
			
									
									
						Window/Gadget repaint
- 
				phuckstepp
 - User

 - Posts: 19
 - Joined: Tue Dec 27, 2005 12:10 pm
 - Location: United Kingdom
 - Contact:
 
If you dont need to process events in the long loop, you could maybe do
This will flush the event queu and repaint the window
			
			
									
									
						Code: Select all
While windowevent() : wend- netmaestro
 - PureBasic Bullfrog

 - Posts: 8452
 - Joined: Wed Jul 06, 2005 5:42 am
 - Location: Fort Nelson, BC, Canada
 
- 
				phuckstepp
 - User

 - Posts: 19
 - Joined: Tue Dec 27, 2005 12:10 pm
 - Location: United Kingdom
 - Contact:
 
i use a flag
in pseudo:
[ code]
if flag = 1
do all that heavy stuff
event = windowevent()
else
event = waitwindowevent() ; no background stuff so feel free to wait
endif
;
; now first handle all events that should be processed even when busy
;
select event
case ..
do whatever
endselect
;
if flag = 1
select event
case ..
do whatever
endselect
endif
;
[/code]
			
			
									
									in pseudo:
[ code]
if flag = 1
do all that heavy stuff
event = windowevent()
else
event = waitwindowevent() ; no background stuff so feel free to wait
endif
;
; now first handle all events that should be processed even when busy
;
select event
case ..
do whatever
endselect
;
if flag = 1
select event
case ..
do whatever
endselect
endif
;
[/code]
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
						( The path to enlightenment and the PureBasic Survival Guide right here... )
