Board index » delphi » StatusBar flickers problem

StatusBar flickers problem

Hello everyone,

  Updating StatusBar (ex: set StatusBar.Panels[0].Text in OnMouseMove event)
  makes it flickers. how to around this problem ?

thanks

herman

 

Re:StatusBar flickers problem


What if you comare the text you are about to set with the text already
there, and only update it if it is different?
-Howard Moon

Re:StatusBar flickers problem


No difference, it redraws whole statusbar even though I only update
statusbar.panels[0].text.

any ideas ?

herman

Quote
Howard Moon wrote in message <7etboo$b...@forums.borland.com>...
>What if you comare the text you are about to set with the text already
>there, and only update it if it is different?
>-Howard Moon

Re:StatusBar flickers problem


I gave it a go myself. First, simply as you suggested with changing the
text. Then I tried it myself with making the panel owner draw. Neither
helped.The problem looks to be that the StatusBar is a TWinControl, which
makes it a window which means that Windows is probably sneaking in an erase
at some level which is what causes the flicker. How around the erase then?

I can not find out right now using the Delphi help, and if I don't get back
to work, my boss will be unhappy. I'm not sure that that is the correct
approach anyway. I'm thinking that if you set the windows style for the
status bar to transparent, that might prevent windows from erasing the
background. Or maybe there is another way? I forget.

If the control isn't erased, then you need a text drawing routine that fills
in the background pixels at the same time as drawing the text. I don't
remember how this is done either.

Time for me to start going back to C programming. ;-)

Other Threads