CommandBar and DockingPanes |
Post Reply |
Author | |
Aidal
Newbie Joined: 14 February 2007 Location: Denmark Status: Offline Points: 9 |
Post Options
Thanks(0)
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
|
|
Jean
Senior Member Joined: 11 December 2006 Status: Offline Points: 110 |
Post Options
Thanks(0)
|
Did you try this:
DockingPane.SetCommandBars CommandBars
?
|
|
Aidal
Newbie Joined: 14 February 2007 Location: Denmark Status: Offline Points: 9 |
Post Options
Thanks(0)
|
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."
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
May be this will help:
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Aidal
Newbie Joined: 14 February 2007 Location: Denmark Status: Offline Points: 9 |
Post Options
Thanks(0)
|
That helped Oleg, thanks for your time guys |
|
Aidal
Newbie Joined: 14 February 2007 Location: Denmark Status: Offline Points: 9 |
Post Options
Thanks(0)
|
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."
|
|
Lee,Changu
Newbie Joined: 25 February 2007 Location: Korea, South Status: Offline Points: 1 |
Post Options
Thanks(0)
|
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. |
|
Aidal
Newbie Joined: 14 February 2007 Location: Denmark Status: Offline Points: 9 |
Post Options
Thanks(0)
|
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
|
|
Aidal
Newbie Joined: 14 February 2007 Location: Denmark Status: Offline Points: 9 |
Post Options
Thanks(0)
|
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.
|
|
Aidal
Newbie Joined: 14 February 2007 Location: Denmark Status: Offline Points: 9 |
Post Options
Thanks(0)
|
Nevermind...
|
|
tioadji
Newbie Joined: 11 February 2007 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
DockMain.SetCommandBars(Me.CommandBars_Main.GetDispatch)
|
|
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 |