Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - How do I create a pane with multiple documents ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How do I create a pane with multiple documents ?

 Post Reply Post Reply
Author
Message
elmue View Drop Down
Groupie
Groupie


Joined: 05 June 2010
Location: Germany
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote elmue Quote  Post ReplyReply Direct Link To This Post Topic: How do I create a pane with multiple documents ?
    Posted: 28 June 2010 at 2:04pm
Hello

Is there a way to create something like on this image ?
I want a dockable pane that contains a tab control with multiple documents in it.

I want one pane which contains all Html documents, another pane that contains all Css files, etc...

I didn't find a sample that shows how to do this.
Is this possible ?
How ?

Thanks
Elmü





Back to Top
Carlos Rocha View Drop Down
Groupie
Groupie


Joined: 11 February 2008
Location: Portugal
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote Carlos Rocha Quote  Post ReplyReply Direct Link To This Post Posted: 28 June 2010 at 8:21pm
In SuitePro (ActiveX) I use method AttachTo() to create tabbed panes:

oPane2:AttachTo(oPane1)
oPane3:AttachTo(oPane1)
SuitePro 20.3.0
OS: Windows 10
Language: Visual Objects 2.8
Back to Top
elmue View Drop Down
Groupie
Groupie


Joined: 05 June 2010
Location: Germany
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote elmue Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2010 at 8:38am
You did not understand my question.
Back to Top
Carlos Rocha View Drop Down
Groupie
Groupie


Joined: 11 February 2008
Location: Portugal
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote Carlos Rocha Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2010 at 9:59am
I think I did

Create HtmlTabControl for html documents, ImagesTabControl for images, and CssTabControl for css files. Put each TabControl in the corresponding Pane, like PaneHtml, PaneImages as PaneCss. Then attach PaneImages and PaneCss to PaneHtml to get the tabbed interface for the panes

PaneImages:AttachTo(PaneHtml)
PaneCss:AttachTo(PaneHtml)

You'll get an user interface like in the image.
SuitePro 20.3.0
OS: Windows 10
Language: Visual Objects 2.8
Back to Top
elmue View Drop Down
Groupie
Groupie


Joined: 05 June 2010
Location: Germany
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote elmue Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2010 at 7:54pm
Attaching the 3 panes together is easy.
This is not the topic of my posting.

But how do I get multiple HTML Views into one Pane with a Tab control above?
And how do I get multiple CSS Views into one Pane with a Tab control above?

Your abtract theories are not very helpfull without any further details or code.
Did you ever program that ?
Try to put your theories into code and you will notice that it is not as easy as you think!

Another problem is that the docking pane manager reserves a space for the MDI childs.
But in this case I don't have any MDI child at all!
All the space is filled with panes!
Back to Top
Carlos Rocha View Drop Down
Groupie
Groupie


Joined: 11 February 2008
Location: Portugal
Status: Offline
Points: 92
Post Options Post Options   Thanks (0) Thanks(0)   Quote Carlos Rocha Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2010 at 11:16pm
So, what you want is to create the TabControls inside the panes?

All my UI is made with tab controls inside Panes, but I use the ActiveX version, and my program language is Visual Objects, not VB. My code would not be very useful.

What I do is something like this (not real code):

oDock := XtremeDockingPane{}
oDock:HideClient := true

oPaneHtml := oDock:CreatePane(1, 100, 100, DockTopOf, nil)
oPaneCss := oDock:CreatePane(2, 100, 100, DockTopOf, nil)
oPaneCss:AttachTo(oPaneHtml)

oTabHtml := XtremeTabControl{}
oTabHtml:AutoResizeClient := true

oTabHtml:InsertItem(0, "Html 1", oChildHtml1, 0)
oTabHtml:InsertItem(1, "Html 2", oChildHtml2, 0)

oPaneHtml:SetHandle(oTabHtml:hWnd)

oTabCss := XtremeTabControl{}
oTabCss:AutoResizeClient := true

oTabCss:InsertItem(0, "Css 1", oChildCss1, 0)
oTabCss:InsertItem(1, "Css 2", oChildCss2, 0)

oPaneCss:SetHandle(oTabCss:hWnd)


oChildHtml1, oChildHtml2, oChildCss1 and oChildCss2 are the documents you want to show.

SuitePro 20.3.0
OS: Windows 10
Language: Visual Objects 2.8
Back to Top
younicke View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 March 2005
Status: Offline
Points: 107
Post Options Post Options   Thanks (0) Thanks(0)   Quote younicke Quote  Post ReplyReply Direct Link To This Post Posted: 30 June 2010 at 12:47am
those tab controls are actually mdi child forms...

just use mdi form and commandbars and then
use the showtabworkspace for commandbars
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2010 at 6:14am
You need CXTPTabClientWnd for the upper tabs. The lower tabs are indeed docking-tabs!
PokerMemento - http://www.pokermemento.com/
Back to Top
elmue View Drop Down
Groupie
Groupie


Joined: 05 June 2010
Location: Germany
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote elmue Quote  Post ReplyReply Direct Link To This Post Posted: 12 July 2010 at 9:20am
Hello

znakeeye:
> You need CXTPTabClientWnd for the upper tabs

Yes I know that.
But do you think that you simply put a CXTPTabClientWnd into a pane and that's it ?
No this will not work.
It's much more complicated!

Carlos Rocha:
> What I do is something like this (not real code):

Thanks for your code.
I suppose that XtremeTabControl corresponds to CXTPTabControl in MFC.
But your code did not help me because there is a CDocument and a CView that I must put into the Tab Control.
In your code these details don't exist, which make life hard.


So none of your answers here helped me.

I invested a lot of hours and now it works.
I published my code here:
http://forum.codejock.com/forum_posts.asp?TID=16939&PID=59284#59284

Hope it helps someone.

Elmü
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.