Removing Flicker while deleting rows in TablelayoutPanel

  • Thread starter Thread starter Sujay Ghosh
  • Start date Start date
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
 
Back
Top