We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,661 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Controls in Tabcontrol Problem

Hi

Here's my problem.. I'm working in Vs2010 C# with Tabcontrols and shapes from the VbPowerPack, so when i try to drop any textbox above the shape in the tab 2 it goes to the tab 1, i already tried selecting the 2nd tab before drop it and nothing, same thing, it's really annoying, if somebody know how to fix this please let me know, if you didn't understand please tell me so i can explain better, i'm a Spanish speaker..

3
Contributors
12
Replies
9 Hours
Discussion Span
7 Months Ago
Last Updated
13
Views
disjes
Newbie Poster
12 posts since Nov 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

I can't recreate this behaviour. Ensure the Tab2 is selected first before adding into the TabControl and it should work. Else could you provide a screen shot of what is happening.

MikeyIsMe
Practically a Posting Shark
802 posts since Nov 2010
Reputation Points: 88
Solved Threads: 69
Skill Endorsements: 10

Hi thanks for the Quick response, look is a very weird behaviour i don't think it can be showed in a screen shot but like i explained i already tried selecting the second tab first and then pasting the textbox avobe a shape it goes to the first tab.. here is the screen shot to get an idea, as you see there are shapes and textbox.. http://ScrnSht.com/gweoen

disjes
Newbie Poster
12 posts since Nov 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Hmm it is a weird behaviour indeed. Im going to have to say im stumped at present as to why it does it? Not enough room on form maybe? But that would be silly as should be able to layer items etc.

MikeyIsMe
Practically a Posting Shark
802 posts since Nov 2010
Reputation Points: 88
Solved Threads: 69
Skill Endorsements: 10

Very weird, this never happened to me in foxpro, But we need to move on.. I'm uploading a video so you can see the problem, please stay online..

disjes
Newbie Poster
12 posts since Nov 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0
disjes
Newbie Poster
12 posts since Nov 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Hmm I'm afraid I've got no clue as to why that is occuring.

MikeyIsMe
Practically a Posting Shark
802 posts since Nov 2010
Reputation Points: 88
Solved Threads: 69
Skill Endorsements: 10

Try removing the shapes and drawing the shapes using System.Drawing and see if that fixes the problem. I've never used the vbPowerPack stuff so I'm not sure if that could be the cause, but wasn't the vbPowerPack stuff supposed to be used with VB only? I didn't even know it worked in C#...I just assumed it was for vb considering the name.

Anyway, I would remove the vb shapes (and the project reference, at least temporarily) and try drawing the rectangles yourself and see if that fixes it.

zachattack05
Posting Pro
583 posts since Dec 2009
Reputation Points: 66
Solved Threads: 16
Skill Endorsements: 0

Isn't there any c# native shape control? when you say draw the shapes by myself, you mean programaticly?

disjes
Newbie Poster
12 posts since Nov 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Yes, programmaticly.

I don't know of any shape controls that show on the design surface other than the vb ones, but the methods to draw shapes in C# are in the system.drawing.graphics class. You could make your own control? Or use a panel if you want a rectangle, but that would change how you access the controls in the panel.

I have a rectangle control that I've used in the past that will let you drag and drop from the toolbox to the design surface, but I'd have to find it again. If you are interested in that I can post the code (or link to the dll).

zachattack05
Posting Pro
583 posts since Dec 2009
Reputation Points: 66
Solved Threads: 16
Skill Endorsements: 0

Yes, the code or the dll would be helpfull.. thanks zachattack05 and MikeIsMe.

disjes
Newbie Poster
12 posts since Nov 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Yes i can make my own controls i'm gonna try it now..

disjes
Newbie Poster
12 posts since Nov 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Man i have a Question, if i do my own control, i put a shape and a textbox avobe and thats it, but how can i handle the binding stuff.. i do it in this way textEmaile.DataBindings.Add("Text", tabla.DefaultView, "emaile"); where tabla is a Datatable, but in a user control i would have to make my own methods and i don't know how i can handle the binding..

disjes
Newbie Poster
12 posts since Nov 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.0950 seconds using 2.7MB