Quantcast
Viewing all articles
Browse latest Browse all 12583

TabControl.SuspendLayout

I have a TabControl which is placed on the form using the designer.  But everything else is done at run time.  So before the code touches the TabControl I do a SuspendLayout.  But none-the-less the control is partially rendered. 

In experiments I have learned that SuspendLayout doesn't actually seem to do anything.  If I remove it I see exactly the same thing.  (This is .Net 3.5 and Win7.)

There's no doubt that the SuspendLayout is being executed.  I even inserted a breakpoint to make sure.

I suspose that I am doing something wrong but I can't imagine what it is.  If I'm not doing anything wrong, is there anything more I can do.  I've thought about doing a Form.SuspendLayout but I have a progress bar on the form which needs to be updated while the TabControl is being populated. 

I've also thought about not using the designer for the TabControl at all.  I might end up doing that but I don't want to do it unless I have do.

Thanks for any thoughts you might have.

Bob


Viewing all articles
Browse latest Browse all 12583

Trending Articles