Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Problem with the TabControl is that when I try to move controls around on the page they move automatically to another page. The only way to locate them in the correct position is to manually adjust the location in the properties box.
Frustrating & time consuming - any help would be appreciated. I have searched high and low for an answer or even for someboody else having the same issue.
Using VB.Net 2010

---
Okay I thought it was straight forward. The problem only happens sometimes on some forms. Controls are combinations of text boxes, labels, lists. Over half the forms have this problem. There are 60 forms in total so the problem is driving me insane.

I just try to move them with the mouse - should be simple.
I am now wondering if it has something to do with the 'Rectangle' that I put on the first page where everything seems to end up once moved (with the mouse). Perhaps its something to do with 'PowerPacks'?

---
Nube quickie - how do I comment without adding a solution?
Posted
Updated 7-Aug-11 1:25am
v4
Comments
OriginalGriff 7-Aug-11 6:39am    
How are you moving them? What are you moving? I tried it with a button, and a picturebox, and had no problems.
#realJSOP 7-Aug-11 7:03am    
You're going to have to improve your question before we can help you. Take us through what you're doing and what's happening step-by-step.
#realJSOP 7-Aug-11 7:31am    
When you see a comment like this one, there's a row of buttons on the right side for each comment you see. One of those buttons allow you to reply to a comment.
#realJSOP 7-Aug-11 7:34am    
What is a "powerpacks"? I've never seen the behavior you're describing. Are we talking about a desktop app, or a web app?
Kaz0801 7-Aug-11 7:43am    
It's a desktop app. It's just the controls for the rectangles and lines.

(Have changed computers and now I have a visible 'comment' - sorry for that dopey question)

1 solution

Is the rectangle a Panel? If so, then when you drag anything over it, it will enter the panel, and stay there.
Check: If you right click on a "moved" control, you will get a list of "Select..." items which are the hierarchy of where the control is. For a button (say) directly on a tab page, you would get:
Select tabPage1
Select tabControl1
Select Form1
For the same button on a panel, on a tab page:
Select panel1
Select tabPage1
Select tabControl1
Select Form1
And so forth.
 
Share this answer
 
Comments
Kaz0801 7-Aug-11 7:58am    
Thanks for the input but alas - no joy.
It is to do with the rectangle. Whenever I put that onto the form it throws out the controls. I was only trying to put a border around the panel with actually drawing the frame.
I will just change the thinking and change the panel to a sunken one instead.
It appears the problem only occurs when the rectangle is on a panel (and then this only occurs sometimes). If I use a rectangle outside the tab control all is well. The 2 obviously don't like being together.
Thanks for your help - and brain matter - on the topic.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900