• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to stop flickering?!!

 
Meghna ks
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I'm having a TextField in which date appears once a mouseclicked event occurs inside it. That is a Calendar shows up the moment I click inside the TextField. I'm using a semantic Calendar and the problem is that whenever it appears on the screen, or if I need to change the month, due to repainting or so, the data inside the calendar flickers a lot. How do I get rid of this problem?!!
Thanks
Meghna
 
Greg Harris
Ranch Hand
Posts: 1012
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can use "double buffering" by creating the image "off-screen" first, and then copying it to the real screen.

of course, this does not have any animation to it... but i think you can get the idea. let me know if you need more detail.
[This message has been edited by Greg Harris (edited April 30, 2001).]
 
David Freels
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try overriding the update method to make a call to paint.
David
 
Matt Robinson
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like the problem could be within their calendar component itself. I would report it to Semantec or check their support to see if its a known issue...

------------------
Matthew Robinson co-author of "Swing" (1999, Manning Publications). Freely available at http://www.spindoczine.com/sbe
 
Meghna ks
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks all, for your responses. I was able to get rid of the flickering by setting the background color of the calendar component. The problem was that each time, the Calendar came on the screen, it would change to different colors and due to the repainting, there was a lot of flickering. I did try to override the paint and Update methods, but in vain. So, this was a last and simple try I gave and it worked.
Thanks again !!!
Meghna
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!