Designer reorders tabs in code only (!!!)

B

Bob Denny

Several times over the last few weeks, I discovered that the designer has
reordered the TabPages on a TabControl in CODE only. If you look at the
TabPages collection in the visual property browser for the TabControl, the
tabs are shown in the correct order. However the "Windows Form Designer
generated code" for the TabControl where it is adding the TabPages

this.tabBrowse.Controls.Add(this.tpxxx);

gets scrambled. I swear on a stack of bibles I haven't touched the Windows
Form Designer generated code at all :) The problem is fatal to my
application. It was a real biatch to find the first time, as I don't paw
through the Windows Form Designer generated code.

Any thoughts or other experiences on this? The last time it happened was on
a release build for the MSI distribution kit!

-- Bob
 
H

Herfried K. Wagner [MVP]

* Bob Denny said:
Several times over the last few weeks, I discovered that the designer has
reordered the TabPages on a TabControl in CODE only.

That's a "known" bug.
 
M

Mikish Vaughn

(e-mail address removed) (Herfried K. Wagner [MVP]) impressed us all with the
following remark:
That's a "known" bug.

For what it's worth...
I've found that going into the Collection and just moving *each* page up or
down and then back to it's intended position seems to rewrite the order
wherever the heck it's being stored, and the tab positions hold for quite a
while. I'm not sure what causes the order to go bonkers again, but I suspect
that it starts with adding a new tab and not doing the fake out fix I listed
above, or perhaps adding new components to a tab.
 
B

Bob Denny

Herfried K. Wagner
That's a "known" bug.

Ugh.

Mikish Vaughn:
For what it's worth...
I've found that going into the Collection and just moving *each* page up or
down and then back to it's intended position seems to rewrite the order
wherever the heck it's being stored, and the tab positions hold for quite a
while. I'm not sure what causes the order to go bonkers again, but I suspect
that it starts with adding a new tab and not doing the fake out fix I listed
above, or perhaps adding new components to a tab.

I haven't added a tab or a control in ages. It "just happens". I have to
check every build to see if it has been corrupted. Annoying to say the
least. I hope we see some fixes soon. I've seen other crazy behavior, but
most of it I attirbute to the fact that many Windows Forms controls are
spray-painted ActiveX/COM controls. So much for purity ;-)

-- Bob
 

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