Using TabControl in a MDI child form |
Post Reply |
Author | |
Ajornet
Newbie Joined: 06 June 2005 Location: France Status: Offline Points: 16 |
Post Options
Thanks(0)
Posted: 08 June 2005 at 1:20am |
Hello,
after many tries with my application and the TabManager example, I have found that I can't use the TabControl inside one of my forms of the MDI collection. Is it true ? Thanks Daniel Edited by Ajornet |
|
Daniel
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Is the for you want to place it on the MDIParent form? If so, try
placing the tab control in a picturebox or panel control. If this
is not what you meant, then are you talking about placing the
tabcontrol on the MDIChild form? Do you use VB6, C#, VB.NET, etc?
|
|
Ajornet
Newbie Joined: 06 June 2005 Location: France Status: Offline Points: 16 |
Post Options
Thanks(0)
|
I want to place my TabControl on a MDIChild form.
I use VB.NET. I've read the post "Using TabControl in a MDI child form" and I've not understood the place for the PictureBox. It's not very clear. Daniel |
|
Daniel
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Not sure what to tell you. I just modified the TabManager Sample
and it worked ok. What problems are you having trying to do
this? I did not need a picture box, I simply placed the Tabcontol
on the MDI Child form.
|
|
Ajornet
Newbie Joined: 06 June 2005 Location: France Status: Offline Points: 16 |
Post Options
Thanks(0)
|
Can you send me the modified TabManager sample.
I will see where I'm wrong. Thanks. |
|
Daniel
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
OK, but keep in mind that I just cut and paste the code to create the
tabs, so not all of the options work. I just used the code to
illustrate how to hadd the tabcontrol.
2005-06-08_081710_TabManager.zip
|
|
Ajornet
Newbie Joined: 06 June 2005 Location: France Status: Offline Points: 16 |
Post Options
Thanks(0)
|
Thanks, but this doesn't work, the MDIChild doesn't have tabs :
This the problem I get. I work in VB.net with VS2003 Daniel |
|
Daniel
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
I uses 2002 and it worked OK.
|
|
Ajornet
Newbie Joined: 06 June 2005 Location: France Status: Offline Points: 16 |
Post Options
Thanks(0)
|
Ok, but there is a big problem. This is a regression.
You see on the forum that I am not alone with this problem. Help me with the panel, I don't see where I have to place one. In your example, is it in the Usercontrols like pagAutoHidePanel or PageTabControl ? And how do I replace this : wndTabControl1.InsertItem(0, "TabWorkspace", pageTabWorkspace.Handle.ToInt32, 300) which handle do I need to use ? Thanks for any help. Daniel Edited by Ajornet |
|
Daniel
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
I know this isn't the best way, but it works. Maybe Oleg can suggest better way for .NET 2003.
2005-06-08_122243_TabManager.zip |
|
Ajornet
Newbie Joined: 06 June 2005 Location: France Status: Offline Points: 16 |
Post Options
Thanks(0)
|
I bought high level control not to program all these bad codes. Ihave to do as with the Microsoft's sstabs !!!
And : - I don't get the controls inside the different pages. - If I open a second document, I get an error on closing it or when I close the application - It's a great job to have dynamically page inside the tab control This product is good, why this feature doesn't work in VS2003 ? I hope this will be corrected soon. Daniel Edited by Ajornet |
|
Daniel
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Wait for Oleg, I think he will know better solution
|
|
Ajornet
Newbie Joined: 06 June 2005 Location: France Status: Offline Points: 16 |
Post Options
Thanks(0)
|
OK, but I work on this problem for 2 days before posting here.
And it becomes urgent for me because I can't work on my application. Daniel |
|
Daniel
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
I will send Oleg an email and see that he looks at this
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
There are simple steps: 1. create MDI application, put TabControl on frmDocument 2. Put Panel1, Panel2 on the frmDocumnet (future tabs) add some controls on them. 3. add this member: Sub CreateTabs() Me.Controls.Remove(Panel1)wndTabControl1.Controls.Add(Panel1) wndTabControl1.InsertItem(0, "TabWorkspace", Panel1.Handle.ToInt32, 300) Me.Controls.Remove(Panel2)wndTabControl1.Controls.Add(Panel2) wndTabControl1.InsertItem(1, "TabControl", Panel2.Handle.ToInt32, 300) End Sub4. _after you create documnet_ call its CreateTabs member: Sub LoadNewDoc() Dim frmDocument As frmDocument = New frmDocument() frmDocument.MdiParent = MefrmDocument.Show() frmDocument.CreateTabs() End Sub |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Ajornet
Newbie Joined: 06 June 2005 Location: France Status: Offline Points: 16 |
Post Options
Thanks(0)
|
Hello,
it's really better to use. It remains a bug with this solution, if we open a second (or more) document the tabs of the first document disappear. It's the same if we resize the window. This in the case of TabControl is marked as 'Fill' in it's dock property. If it is not marked as fill all seem to be good. But if we do like this : - open a document - click another tab than the first - open another document - the tabs of the first don't disappear Stange, isn't it ? I will try to click programmatically. Daniel |
|
Daniel
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
I can't reproduce it, may be you set some another options.... May be you can attach your project/new simple application to show this bug? |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Ajornet
Newbie Joined: 06 June 2005 Location: France Status: Offline Points: 16 |
Post Options
Thanks(0)
|
Hello,
I modify the tabmanager project a little. I have two panels the first with a grid (MSExcel) and the second with a chart (MSChart). The problem arises when dock property is set to "fill" for all the components : the tab, the two panels, the grid and the chart. Create some docs, play with there, click the tabs, click the document and not after a long time tabs disappear. PS : In reality, I will use TeeChart and a grid in tests. |
|
Daniel
|
|
Ajornet
Newbie Joined: 06 June 2005 Location: France Status: Offline Points: 16 |
Post Options
Thanks(0)
|
Hello,
it seems that if I set the dock property : - to 'Fill' for the tabControl and for my components inside the panels - and to 'None' for the panels it's work perfectly So I get exactly what I want since the beginning. I want to thank you for your help and your patience. |
|
Daniel
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |