Print Page | Close Window

CommandBar and DockingPanes

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=6414
Printed Date: 01 May 2024 at 8:58pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CommandBar and DockingPanes
Posted By: Aidal
Subject: CommandBar and DockingPanes
Date 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



Replies:
Posted By: Jean
Date Posted: 14 February 2007 at 8:32am
Did you try this:
DockingPane.SetCommandBars CommandBars
?
 


Posted By: Aidal
Date 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."


Posted By: Oleg
Date Posted: 15 February 2007 at 4:47am
Hi,
May be this will help:
http://www.codejock.com/support/articles/com/dockingpane/dp_3.asp - http://www.codejock.com/support/articles/com/dockingpane/dp_3.asp


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Aidal
Date Posted: 15 February 2007 at 5:04am

That helped Oleg, thanks for your time guys



Posted By: Aidal
Date 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."


Posted By: Lee,Changu
Date 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.


Posted By: Aidal
Date 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
 


Posted By: Aidal
Date 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.
 


Posted By: Aidal
Date Posted: 27 February 2007 at 9:03am
Nevermind...


Posted By: tioadji
Date Posted: 02 July 2007 at 4:49am
  DockMain.SetCommandBars(Me.CommandBars_Main.GetDispatch)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net