[SOLVED]; PB5.31; Win7; scrollbar; async repaint of box

Windows specific forum
HanPBF
Enthusiast
Enthusiast
Posts: 570
Joined: Fri Feb 19, 2010 3:42 am

[SOLVED]; PB5.31; Win7; scrollbar; async repaint of box

Post by HanPBF »

Hello!

I have a horizontal scrollbar bound to an owner made repeater box having some gadgets.
The horizontal scrollbar does allow to move the box left/right.

I bound the scrollbar event with BindGadgetEvent which fires immediately; which is what it should do.

Now, I have the problem that the box is too often redrawn and moving the scrollbar fast gives an annoying flickering.

Any idea how I could prevent repaint for some ms?
Do I have to use AddWindowTimer to async the update of the box?
Is there a better solution?
Is there a timer callback like in JS (setTimeout()) which can be given a callback?
Any other hint I'd appreciate a lot!


Thanks a lot in advance!
Last edited by HanPBF on Fri May 22, 2015 1:32 pm, edited 1 time in total.
HanPBF
Enthusiast
Enthusiast
Posts: 570
Joined: Fri Feb 19, 2010 3:42 am

PB5.31; Win7; scrollbar; async repaint of box; flickering

Post by HanPBF »

solved...

Code: Select all

;in scrollbar handler
;...
LockWindowUpdate_(WindowID(EventWindow()))		
updateListGadget(*LG)
LockWindowUpdate_(0)
;...
Post Reply