Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - CommandBar and DockingPanes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CommandBar and DockingPanes

 Post Reply Post Reply
Author
Message
Aidal View Drop Down
Newbie
Newbie
Avatar

Joined: 14 February 2007
Location: Denmark
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aidal Quote  Post ReplyReply Direct Link To This Post Topic: CommandBar and DockingPanes
    Posted: 14 February 2007 at 7:44am
I'm attempting to create a windows forms application with a look similar to the one in Outlook though more simple.
 
So I want a commandbar at the top and two panes side by side under the commandbar. 
 
I've created the comandbar with the designer and it looks as it's supposed to with icons and everything.
 
However, I'm having some problems with the two panes. I can make them appear side by side as intended but they are both docked to the top of the main form pushing my commandbar to the right.
 
The idea was for the commandbar to be docked to the top and have full form width and that gets ruined as soon as I add the panes.
 
Here is a text based example of what I'm trying to do, since I cannot use HTML here.
 
|---------------------------|
|.....commandbar.........|
|---------------------------|
|................|.................|
|..pane1....|..pane2.....|
|................|.................|
-----------------------------
 
Any suggestions?
 
/Aidal
Back to Top
Jean View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post Posted: 14 February 2007 at 8:32am
Did you try this:
DockingPane.SetCommandBars CommandBars
?
 
Back to Top
Aidal View Drop Down
Newbie
Newbie
Avatar

Joined: 14 February 2007
Location: Denmark
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aidal Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2007 at 2:57am
If I do
obj_MyDockingPane.SetcommandBars(obj_MyCommandBars);
 
It has no effect other than an error message I get in form of a MessageBox with title "DockingPane" and the text "Member not found."
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2007 at 4:47am
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Aidal View Drop Down
Newbie
Newbie
Avatar

Joined: 14 February 2007
Location: Denmark
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aidal Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2007 at 5:04am

That helped Oleg, thanks for your time guys

Back to Top
Aidal View Drop Down
Newbie
Newbie
Avatar

Joined: 14 February 2007
Location: Denmark
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aidal Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2007 at 7:02am
Hmm... it's helped on the alignment of the UI elements but I still get ithe MessageBox with title "DockingPane" and the text "Member not found."
Back to Top
Lee,Changu View Drop Down
Newbie
Newbie


Joined: 25 February 2007
Location: Korea, South
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lee,Changu Quote  Post ReplyReply Direct Link To This Post Posted: 25 February 2007 at 11:12pm
Hi Aidal.

If you are coding with .NET framework...

I've suffered from the same problem, and I eventually found the answer.
You can also be found the answer on frmMain.cs:313 of GUISample project in sample directory.
You will be noticed that you should use CommandBars.GetDispatch() as a prameter of SetCommandBars () instead of CommandBars object.

I convince that it must be helpful.
Back to Top
Aidal View Drop Down
Newbie
Newbie
Avatar

Joined: 14 February 2007
Location: Denmark
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aidal Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2007 at 3:06am
Thanks for your reply Lee but I was already doing the Dispatch thing, so I don't think that is the problem.
 
At the moment it's the actual "load form into pane" that is bugging me.
 
I believe it's somwhere around here the problem is:
------------------------------------
private void axDockingPane1_AttachPaneEvent(object sender, AxXtremeDockingPane._DDockingPaneEvents_AttachPaneEvent e)
{
switch (e.item.Id)
{
case ID.ShortCutPane:
if(this.FormPaneA == null)
{
this.FormPaneA = new FormPaneA();
}
e.item.Handle = this.FormPaneA.Handle.ToInt32();
break;
}
}
------------------------------------
 
Another thing is that, as mentioned earlier I have 2 panes side by side. The right pane (which is supposed to change contents accordng to what's selected in the left pane) doesn't fill out the rest of the form as it should, it stops about 2cm from the right form edge.
 
But still, loading forms into my panes is my main priority at this moment.
 
/Aidal
 
Back to Top
Aidal View Drop Down
Newbie
Newbie
Avatar

Joined: 14 February 2007
Location: Denmark
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aidal Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2007 at 8:49am
Ok, so I figured out how to load the form into the pane. Turns out I was using a wrong ID for the pane.
I still have the problem with the right pane (of the two panes) still won't fill the rest of the form, but stops about 2 cm from the right edge.
 
Another thing I cannot seem to find a clear description of is how to add ShortcutBarItem(s) to a ShortcutBar.
 
The samples that comes with the suite installation are messed up, so I cannot use them.
 
Back to Top
Aidal View Drop Down
Newbie
Newbie
Avatar

Joined: 14 February 2007
Location: Denmark
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aidal Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2007 at 9:03am
Nevermind...
Back to Top
tioadji View Drop Down
Newbie
Newbie


Joined: 11 February 2007
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote tioadji Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2007 at 4:49am
  DockMain.SetCommandBars(Me.CommandBars_Main.GetDispatch)
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.156 seconds.