Jump to content
  • Advertisement
Sign in to follow this  
DrjonesDW3d

[.net] Tab style pannel flipping

This topic is 4531 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to set up a series of pannels that lie over one another, each containing different data. The top most pannel (the one that is currently visable) is set based on some event. The behavior is similiar to the way tabs work, but without the tabs. The problem I am having is that currently when I swap them I set the pannels visable property to false (for the one that was previously visable) then take the one that should be visable next and set it's visable property to true. That has the desired behavior (with the old panel hiding and the new one showing) but with the problem that all the components on the new one kind of 'flicker' there way onto the screen when the panel is made visable. Does anyone know how to get around this (maybe in the panels paint function) so that it draws everything before it shows, rather than drawing each piece and causing some graphical disturbance. I know it's possible because with tabs things are always smooth and instantanious.

Share this post


Link to post
Share on other sites
Advertisement
Old thread but finally found a solution for .NET 1.1

Setstyle(Controlstyles.AllPaintingInWmPaint, true);

Put that in the constructor for the form and the flickering pretty much goes away.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!