views:

159

answers:

2

I am using Visual Studio 2008 and recently a wierd bug has appeared.

In my forms I have a tab control with multiple tab pages. I can place a control on a tab page fine, but when I move it by way of clicking it and dragging it to another location, it leaves behind an outline of where it should be. Looking around, it has moved to the first tabe page.

I can move controls around by clicking on them, and using the arrow keys, but that slow and tedious, and all the line up features are not used.

Has anyone else experienced this issue? Any solution to it? And yes, I am on the latest service pack.

+1  A: 

Tab control dont support element posioning on tabs. You can add Panel control to each tab and set Dock property to them. Then you can place your controls directly to Panel controls.

Stremlenye
What? Since when is this true? You're think of `TableLayoutPanel`.
Dan Tao
Just test it ;)
Stremlenye
I have never used Panels, and I haven't experienced this issue until this week.
Chris
Panel is the most simple container. Just drop it on form or tab, or in another container, set some size and style params. This control supports dock property and can fill parent container. In panel you can place controls as you wish, like you make it on the form.
Stremlenye
A: 

I'd suggest that if you're going to have more than couple of controls on each page, create your own user controls, one for each tab, and then put the other controls in them as needed and then put those usercontrols on the tab in a Docked.Fill state. Otherwise if you have a reasonably complex tabcontrol your code will quickly get very messy.

ho1