Tab Control Bug

  • Thread starter Thread starter Laszlo Szijarto
  • Start date Start date
L

Laszlo Szijarto

When I use the Tab Pages Collection editor, invoked from the Properties of a
TabControl, I try to shuffle the order of the pages around, and it does not
work. I had to go into the "Windows Forms Designer generated code" and edit
the order manually.

In addition, there was a project where I made some changes to the events in
the Windows Forms Designer region, and every time I compiled the code, my
changes were somehow undone, and the compile failed. Very annoying.

Will Microsoft please fix its IDE?
 
Laszlo,

Can you post a small project which shows how the designer isn't working
when you try and shuffle the order of the pages around.

As for the second part, you are actually warned against changing code in
the Windows Forms Designer region, so that is not really a bug. What are
you changing in that region?
 
Hi, Nicholas,

Thank you for the response. Sorry it took me so long to get back.
Can you post a small project which shows how the designer isn't working
when you try and shuffle the order of the pages around.

I don't have a small project right now to post. I can't duplicate the bug.
I simply had a TabControl with 5 Tab Pages. I wanted the change the order
of the Tab Pages. So I went to the Tab Page Collection property in the
TabControl, opened it up, and moved the pages using the Up and Down Arrows.
It said that they were in the order I wanted. And they appeared in the
correct order in Design View. But, when I started my app (Debug), they were
still in the old order. If I stopped the app and looked at the Designer,
they were back in the right order. I went into the Windows Forms Designer
region, move the order of the "Add(..)" methods around manually, then
everything was as I wanted it.

I noticed a similar thing when I was using Reflection. I had a class which
had quite a number of members that I was recursing through. At one point, I
added a few members to that class and changed the order of members around.
But, when I iterated through the class members using reflection, things were
still in the old order and the new members had not been added. FINALLY, I
went and blew away all the subfolders in my project directory -- keeping
only the source -- recompiled, and THEN things were correct.

It's almost as if something isn't being recompiled, maybe a problem with
JIT.

As for the second part, you are actually warned against changing code in
the Windows Forms Designer region, so that is not really a bug. What are
you changing in that region?

Well, I am forced to enter that region sometimes. If, for example, I remove
an Event Handler from my code (change my mind), the code crashes upon my
next compile attempt, because the IDE doesn't remove where it adds that
particular event-handler to some object. OK, so I manually remove it from
the Designer region, save all, recompile, and all's well. Then I go back in
to my main source code, make a couple other (seemingly unrelated) changes,
recompile and that original event handler addition operator (the += thing)
mysteriously reappears. IDE did that about 10 times, and then, for some
unknown reason, stopped doing it.

Very weird.

Thank you,
Laszlo
 
Back
Top