Removing Flicker while deleting rows in TablelayoutPanel

S

Sujay Ghosh

Hi,

I am programmatically deleting N rows ... at runtime .

My code is some what like below ;-

TableLayoutPanel tb = new TablelayoutPanel;

tb.SuspendLayout () ;

DeleteRow ( nRowPos ) ; // my function to delete row .. see logic below

tb.Resumelayout(false) ;
tb.PerformLayout() ;

private void DeleteRow( nRowPos )
{

// Get the controls within the table & Delete them
// tb.RemoveAt( nRowPos )
tb.RowCount --;
// Shift the controls & rows up ....

}

I have also tried by setting the Visible property to false and resetting it
to true afer deletion.

I want to get rid of the flicker which happens during deletion and painting .

Is there any way of minimizing the flicker if not completely stopping it.


Thanks in advance .

Sujay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top