AlexBB
AlexBB wrote: |
Mick Doherty wrote: |
edit: Fixed the first link.
| |
|
|
Mick, thank you again. I want to add one more challenge for you. This is the problem I've encountered and haven't been able to solve so far cleanly. It works only partially for me, although I haven't given it a lot of attention yet.
I generate TabPages at runtime and frequently have to reduce their number. I want to completely destroy the object, not to hide it. It works. This is not a problem, however:
When the first row of tabs is filled, the app begins to fill the second row. By doing so it has to decrement the height of the existing pages in order to fit them in TabControl and the form itself. It screws my graphics positioned on the additional pages I've created. I neatly soved the problem by using sizeChanged event for TabPage but so far it worked only in one direction when the number of pages gets large enough for the app to form two rows. When I decrease the number to drop from two to one row I end up with form and TabControl retaining the enlarged heights.
So, if this is an interesting problem for you, would you give it a thought