Click here to Skip to main content
Click here to Skip to main content

Visual Studio IDE like Dock Container - Second Version

By , 2 Oct 2009
 

Introduction

This is the second version of the product Crom.Controls.Docking.

What's new

The following functionalities were added/changed:

  • Complex docking: it is now possible to create complex layouts:

    Docking001_600x432.PNG

  • Preview on mouse hover over auto-hidden buttons:

    Docking002_600x432.PNG

  • Form selector using Ctrl+Tab:

    Docking003_600x432.PNG

  • Save/load layout

Using the Code

Here are the basic steps that you need to do for using the control:

  • Add reference to Crom.Controls.dll assembly in your project
  • Place a DockContainer control on your form and set its Dock property to DockStyle.Fill
After completing these steps you can start using the control.

Adding a form to the dock guider container

First you need to add a form to guider using the method:
    DockableFormInfo Add(Form form, zAllowedDock allowedDock, Guid formIdentifier)

The parameters are:

  • form which should be a not null, not disposed instance of the form to guide, with the following properties set:
    • FormBorderStyle = FormBorderStyle.SizableToolWindow
    • TopLevel = false
  • allowedDock is the enumeration of the places where the form is allowed to be docked.
  • formIdentifier is an unique identifier associated with the form. These identifiers will be used when the layout state is saved/restored so they should be defined as constants in your application.
When adding a form to the guider, you'll receive a DockableFormInfo object. This object contains information about the guided form and is required by DockContainer on any operation with the form.

Docking a form added to the container

You can dock a form previously added to the container by calling one of the methods:
  • void DockForm(DockableFormInfo info, DockStyle dock, zDockMode mode)
  • void DockForm(DockableFormInfo info, DockableFormInfo infoOver, DockStyle dock, zDockMode mode)
The first method should be called when docking the form directly in the container, the second should be called when docking the form over an existing form. The parameters are:
  • info which should be a not null, not disposed instance of the form information obtained after adding a form to guider.
  • dock initial dock of the form (must be a valid dock value, other than DockStyle.None)
  • mode initial dock mode with one of the values:
    • zDockMode.Outer to dock the form on one of the margin edges of the container.
    • zDockMode.Inner to dock the form near the center of the free area of the container.
  • infoOver is the information of the form over which you want to dock your form.

Undocking a docked form

You can undock a docked form by calling the method:
    void Undock(DockableFormInfo info, Rectangle hintBounds)
The parameters are:
  • info which should be a not null, not disposed instance of the form information obtained after adding a form to guider.
  • hintBounds are the proposed bound of the form after will be undocked.

Removing a from from container

You can remove the from from container by calling the method:
    void Remove(DockableFormInfo info)
where info is the not null, not disposed instance of the form information obtained after adding the form to guider.

Getting the forms added in the container

You can get the count of forms added in the container by calling the property:
    int Count
    {
      get;
    }
You can get the information for a form added in the container by calling the property:
    DockableFormInfo GetFormInfoAt(int index)
where the index is the form index with valid values from 0 (zero) to Count - 1

Toggling the AutoHide mode of a docked window

To toggle the AutoHide mode of a docked window you should call the method:
    void SetAutoHide(DockableFormInfo info, bool autoHide)
The parameters are:
  • info which should be a not null, not disposed instance of the docked form information obtained after adding a form to guider.
  • autoHide is the flag indicating if should set auto-hide mode(true) or unset it(false)

Selecting a form

To select the input for a form you should set (true) the IsSelected property of DockableFormInfo object associated with the form. To intercept when a form is selected/deselected, you should connect to the SelectedChanged event of DockableFormInfo object associated with the form.

Associating context menu

To associate a context menu to a guided form you should connect to the ShowContextMenu event of the DockContainer control. The handler of this event should be something like:
     void OnDockerShowContextMenu(object sender, FormContextMenuEventArgs e)
     {
        contextMenuStrip1.Show(e.Form, e.MenuLocation);
     }

Preventing the close of a form

To disable closing a form you should connect to FormClosing event of the DockContainer control. The handler of this event should be something like:
     void OnDockerFormClosing(object sender, DockableFormClosingEventArgs e)
     {
        DockableFormInfo info = _docker.GetFormInfo(e.Form);
        if (info.Id == new Guid("0a3f4468-080b-404e-b012-997b93ed2005"))
        {
           e.Cancel = true;
        }
     }

Destroying a closed form

To destroy a closed form you shoud connect to FormClosed event of the DockContainer control. The handler of this event should be something like:
     void OnDockerFormClosed(object sender, FormEventArgs e)
     {
        e.Form.Close();
     }

Saving/restoring the container layout

To save/restore the container layout you need to use an object of type DockStateSerializer. To save the container layout you should call from DockStateSerializer the method:
    void Save() 
The layout state is saved by default in the local application data folder of your application. This default path is given by the serializer.SavePath property of the serializer and can be changed through this member. To load the container layout you should call from DockStateSerializer the method:
    void Load(bool clear, FormFactoryHandler formsFactory)
The parameters are:
  • clear a flag indicating if shoul clear all existing forms from the docker, before restoring the state (recommended value is true).
  • formsFactory is a handler to a form factory method.
The form factory method signature is Form CreateTestForm(Guid identifier). This method should return the instance of the form associated with given Guid identifier.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionAutoScrolling PinmemberBarterKing14-Jan-13 12:29 
I cannot get scrollbars when I resize the master parent form, if I use the sizing handles, or make a child form a floating form.
 
Auto scroll is set to true on my forms, but no scroll bars. Is this a quirk of this control or am I doing something wrong?
 
Thanks
QuestionHow to restrict this movement of Form within the DockContainer? PinmemberJunaid Ahamed.G29-Oct-12 4:52 
When User Drags the Panel (Form) outside the DcokConatiner, the form disappears and there is no way to get it back, except to restart the application. So, basically I need to restrict the movement of each form in the dock container within it, like in the visual designer where when user moves the control out of the window, it stops at the top or bottom of the window, but doesn't disappear.
GeneralDocking a User Control not Form?? Pinmemberloosyjhony16-Oct-12 22:00 
How can I dock a User Control instead of "Form"?
QuestionForce inner docking (and hide outer docking icons) PinmemberVincent Delhaye11-Oct-12 23:10 
I'd like to know if it's possible to allow only inner docking for a specific type of forms?
 
By inner docking I mean hiding the outer arrows and showing only the center square with the four possible docking positions.
 
I tried forcing
info.DockMode = zDockMode.Inner;
in FormsTabbedView.cs but it doesn't seem to change anything...
AnswerRe: Force inner docking (and hide outer docking icons) PinmemberVincent Delhaye12-Oct-12 0:23 
QuestionHow can I select a tabbed form programmatically? PinmemberMember 852828830-Aug-12 0:16 
I have several forms docked, and they each have a tab. The user can select a tab to bring its form to the front; but I can't see how to do the same thing programmatically - - to bring a specific tabbed window to the front. Anyone?
AnswerRe: How can I select a tabbed form programmatically? PinmemberMember 852828830-Aug-12 0:24 
I just answered my own question; it's too simple. Just set DockInfo.IsSelected = true;
 
Cheers!
GeneralRe: How can I select a tabbed form programmatically? PinmemberMember 261827315-Sep-12 4:43 
QuestionAn another good article to read Pinmemberraj23karthik13-Jun-12 19:58 
very good work
Also thanks a lot !
Smile | :)
Karthik

QuestionAfter Loading Positions or not Same Pinmemberprasad@12346-Apr-12 0:45 
Save the Form Positions And Close it If we can Load it Positions are not Exat Position why?
AnswerRe: After Loading Positions or not Same PinmemberJesusrcm16-Oct-12 2:14 
GeneralRe: After Loading Positions or not Same PinmemberDeusiro9-Jan-13 5:52 
GeneralMy vote of 5 PinmemberProEnggSoft7-Mar-12 4:13 
Good Article
GeneralMy vote of 5 Pinmembermanoj kumar choubey20-Feb-12 19:32 
Nice
QuestionWPF PinmemberSameh Kamal30-Jan-12 1:36 
Hi Sir
 
I saw your excellent IDE. Do you plan to make the WPF version from this IDE.
 
Wish to hear from you.
b. regds
Sameh
QuestionHow to hide docked forms? Pinmemberfratello24-Jan-12 3:32 
Say I want to hide a docked form and later show it in the place it used to be. How would I achieve this?
 +-----+-----+-----------------+
 |     |     |                 |
 |     |     |                 |
 |     |     |                 |
 |     +-----+                 |
 |     |     +-----------------+
 |     |     |                 |
 |     |  F  |                 |
 |     |     |                 |
 |     |     |                 |
 +-----+-----+-----------------+
 
I want to hide form F and later show it in the same place. Is there a way of achieving this? I don't want to consider the case when the layout changes after the form was hidden and before form is shown again.
 
Thanks!
GeneralMy vote of 5 PinmemberTony's Toy14-Nov-11 14:55 
Very nice! I decide to use this in my game editor project.
QuestionIn windows 7 Pinmembersibytp2-Aug-11 22:52 
excellent work
 
unfortunately I found a error.
pressing Windows short cut key while dragging a form generating error.
 
thanks
QuestionNice Control Pinmemberghvnd28-Jul-11 10:08 
Hi,
 
you made a very nice control.
The only thing that's sucking is, that I have to pass the class GUID's for each form.
You could make thing's much simpler with an integer field that works like a primary key with increment in a database.
To pass/generate this long confusing string is really disgusting.
Or you can use a hashtables or even a dictionaries with a primarykey to indentify the different forms.
 

Greets
simon
GeneralMy vote of 2 Pinmemberkribo5-May-11 14:41 
nice little control
Generalwhy your codes never work Pinmembervincezed16-Apr-11 12:35 
your codes never works.. version one shows the same errors as version two...
 
can u resolve it...
 
it shows exe not found...
GeneralDocked Window not on top PinmemberDeepesh Dhapola28-Mar-11 18:23 
Hi,
 
I liked this control library hence started using it. I noticed a small issue wherein docked window goes behind any other controls dropped on the dockcontainer. any idea if I need to set any properties to fix this?
 
thanks,
Deepesh
GeneralMy vote of 3 PinmemberTheingi Win10-Feb-11 13:20 
Good Article for Docking
 
Thanks! Theingi
GeneralMy vote of 5 Pinmemberv# guy27-Jan-11 11:51 
Great for me
QuestionHow to move dockable window outside container (client area) Pinmemberharoldsy8-Dec-10 13:54 
How to move dockable window outside container (client area)
thanks
 
Harold
GeneralBug - Saving PinmemberMember 476655714-Nov-10 7:35 
If there are three forms in a row its switching the dock in one of them when saving
 
Example: look at the dock in the second form
 
code:
DockContainer1.DockForm(DockInfo_Folders, DockStyle.Right, Crom.Controls.Docking.zDockMode.None)
DockContainer1.DockForm(DockInfo_Courses, DockInfo_Folders, DockStyle.Bottom, Crom.Controls.Docking.zDockMode.Outer)
DockContainer1.DockForm(DockInfo_Categories, DockInfo_Courses, DockStyle.Bottom, Crom.Controls.Docking.zDockMode.Outer)
 
This is what it saved:
 
<Form>
      <Guid>00000000-0000-0000-0000-000000000002</Guid>
      <AllowedDock>All</AllowedDock>
      <CurrentDock>Right</CurrentDock>
      <CurrentMode>None</CurrentMode>
      <IsSelected>false</IsSelected>
      <IsAutoHide>false</IsAutoHide>
      <Width>268</Width>
      <Height>193</Height>
   </Form>
   <Form>
      <Guid>00000000-0000-0000-0000-000000000005</Guid>
      <AllowedDock>All</AllowedDock>
      <CurrentDock>Top (Suppose to be Bottom)</CurrentDock>
      <CurrentMode>None</CurrentMode>
      <IsSelected>false</IsSelected>
      <IsAutoHide>false</IsAutoHide>
      <Width>268</Width>
      <Height>236</Height>
      <ParentGuid>00000000-0000-0000-0000-000000000002</ParentGuid>
   </Form>
   <Form>
      <Guid>00000000-0000-0000-0000-000000000001</Guid>
      <AllowedDock>All</AllowedDock>
      <ShowSettings>false</ShowSettings>
      <CurrentDock>Bottom</CurrentDock>
      <CurrentMode>None</CurrentMode>
      <IsSelected>false</IsSelected>
      <IsAutoHide>false</IsAutoHide>
      <Width>268</Width>
      <Height>226</Height>
      <ParentGuid>00000000-0000-0000-0000-000000000005</ParentGuid>
   </Form>
GeneralHelp with implementing a monthcalendar PinmemberFuXXz26-Oct-10 1:18 
Hello,
 
at first your work is really great. But now, I have a problem and I need your help.
The situation is the following:
 
I implemented a monthcalendar on a dockform.
Furthermore I docked the form at the container.
When I minimize the mainwindow, which implemts the dockcontainer, I get this error:
(An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in System.Windows.Forms.dll
Additional information: Der Wert -1 ist für LargeChange ungültig. LargeChange muss größer als oder gleich 0 sein.)
 
When I set the monthcalendar invisible or when the form with the calendar isn't docked, no error occurs.
 
Do you already know this problem, or better, do you have any suggestions or solutions?
 
I would be pleased about an answer.
 
Best regards
 
Rebecca
Questionho can I use it with VB.NET? Pinmembermfsav215-Oct-10 10:38 
I have an app done with VS2010 and .NET 4.0
 
I used VB.NET to develop. I need to make it docking.
Can I use your excellent library?
GeneralDockable Windows Always on Top PinmemberMember 45344957-Oct-10 2:57 
Is it possible to force the dockable windows to always be on top? I am using the control in a slightly different manner, and all child controls of the docking container are always on top of the docked forms, even after setting them to topmost or bringtofront.
GeneralChange size of DockableFormInfo in x and y size with one mouse click PinmemberS078420-Sep-10 23:35 
Hi everybody,
 
does anybody know if I have to change a property or a flag to be able to change the size of DockableFormInfo with one mouse click. At the moment I have to change first the size of x and then size of y. For me as user this is very inconvenient.
 
Thanks for help
and VERY nice project
GeneralRe: Change size of DockableFormInfo in x and y size with one mouse click PinmemberS07842-Nov-10 1:06 
QuestionClicking Form Header Undocks PinmemberJLT25-Aug-10 18:28 
It seems just clicking on the title bar of a window (not dragging) is enough to undock. This is not how the VS IDE works. It's a real pain as I have a toolbar on the left and just touching it in the wrong place undocks it and my other window fills in underneath.
 
Is this a bug or am I using it wrong?
Thanks
GeneralCursor problems PinmemberAjunta9-Aug-10 3:36 
Hello!
 
Thanks for this great component!
 
I've got some problems with cursor - then docked forms are in tabs & you are trying to move it, your cursor will be Cursors.Hand. Now drag&drop operation is complete and all forms are successfully docked, I'am moving cursor back to form area, but it does not returns to Cursors.Arrow, it's still Cursors.Hand.
QuestionWhere and how to use TabPageView and TabbedView controls? PinmemberM. Niyazi1-Aug-10 7:21 
Could you give a small example? And I'll be glad if you mention what is the difference?
 
Great work by the way, thanks..
mn.yarar

GeneralException/Bug Report and Question [modified] PinmemberMember 425011730-Jul-10 2:54 
Hi there !
 
I get an exception when using your sample application:
 
1. I switched all DockableFormInfo to zAllowedDock.All
2. Start the Program + Work->Initialize
3. Dock Form5 to the top of Form7
4. Dock Form3 to the left of Form7
5. Try to undock/move Form5
6. This leads to a "Other container must have a view" assert, and the Debugger jumps to FormWrapper.cs stating the error message Win32Exception "Error creating window handle".
 
This is also possible when using other forms (e.g. it doesn't have something to do with the Form5).
 
What do you think about that ?
 

Another question is, is it possible to dock windows on runtime which are not docked programmatically on design time and vice versa (undock a docked window which then is no longer part of the DockContainer) ?
Because otherwise dockable windows act only like children in a MDI application, not as independent window.
 
Thanks in advance
 
By the way, great work!
---
Henning
modified on Friday, July 30, 2010 9:02 AM

GeneralLicense discrepancies PinmemberLee Paul Alexander8-Jul-10 0:32 
On the codeproject page you say your using the CodeProject License but in your source you are using your own one. Sort out which one your using please!
 
Lee
GeneralAbout delete button Pinmembercogili17-Jun-10 23:37 
If you just add one DockableFormInfo and whether the ShowCloseButton property is true or false.
the close button always show.
GeneralRe: About delete button PinmemberS078421-Jun-10 23:33 
QuestionBug DockStyle.None?? PinmemberS078411-Jun-10 0:36 
Hi everybody,
 
i still check the Dock Container. Is there a bug if you start a the form with DockStyle.None?
 
There is an extract from my code.
This one throws no exception:
 
public void InitialiseDockableForms()
{
m_frmHistogram = new FormHistogram();
m_frmHistogram.FormBorderStyle = FormBorderStyle.SizableToolWindow;
m_frmHistogram.TopLevel = false;
DockableFormInfo frmHistogram = DockContainer.Add(m_frmHistogram, zAllowedDock.All, new Guid("4C44BC17-D5E6-491e-8AE9-FC478D71CF87"));

m_frmDisplayedImageData = new FormDisplayedImageData();
m_frmDisplayedImageData.FormBorderStyle = FormBorderStyle.SizableToolWindow;
m_frmDisplayedImageData.TopLevel = false;
DockableFormInfo frmDisplayedImageData = DockContainer.Add(m_frmDisplayedImageData, zAllowedDock.All, new Guid("4FCD50C8-A085-4f45-BB68-9269D401BFE0"));

 
m_frmValuesMarked = new FormValuesMarkedArea();
m_frmValuesMarked.FormBorderStyle = FormBorderStyle.SizableToolWindow;
m_frmValuesMarked.TopLevel = false;
DockableFormInfo frmValuesMarked = DockContainer.Add(m_frmValuesMarked, zAllowedDock.All, new Guid("A7941F16-8FDD-45b8-8343-7B02DB159500"));

m_frmMainImage = new frmMainImage();
m_frmMainImage.TopLevel = false;
DockableFormInfo frmMainImage = DockContainer.Add(m_frmMainImage, zAllowedDock.All, new Guid("73432775-38D7-4184-BAEC-FE0D1E21B33A"));

//m_FormTest = new FormTest();
 
DockContainer.DockForm(frmHistogram, DockStyle.Left, zDockMode.Outer);
DockContainer.DockForm(frmDisplayedImageData, DockStyle.Top, zDockMode.Outer);
DockContainer.DockForm(frmValuesMarked, DockStyle.Right, zDockMode.Outer);
DockContainer.DockForm(frmMainImage, DockStyle.Bottom, zDockMode.Outer);
 
DockContainer.SetAutoHide(frmHistogram, false);
DockContainer.SetAutoHide(frmDisplayedImageData, false);
DockContainer.SetAutoHide(frmValuesMarked, false);
DockContainer.SetAutoHide(frmMainImage, false);
}
 
if i change now to DockStyle.None from any from the application cannot start and throws the following
exception:
 
....
....
at DockLayout.DockControl(DockableContainer containerToDock, DockableContainer containerWhereToDock, DockStyle dock, zDockMode mode).
 
Thanks for your help. Very nice project!!!!! Thumbs Up | :thumbsup:
GeneralLoad error Pinmemberc-w-m8-May-10 6:04 
The demo throws an error when you
1. Open | 2. Initialize | 3. [make changes to layout] | 4. Save | 5. Initialize again | 6. Load.
 

************** Exception Text **************
System.NotSupportedException: Err
at Crom.Controls.Docking.FormsTabbedView.SetDock(DockStyle hostContainerDock, DockStyle dock, zDockMode mode)
at Crom.Controls.Docking.DockLayout.SetViewDock(FormsTabbedView view, DockStyle hostContainerDock, DockStyle dock, zDockMode mode)
at Crom.Controls.Docking.FormsDocker.OnSetHostContainerDock(Object sender, DockControlEventArgs e)
at Crom.Controls.Docking.Autohide.OnSetHostContainerDock(FormsTabbedView view, DockStyle dock)
at Crom.Controls.Docking.Autohide.SetAutoHideMode(FormsTabbedView view)
at Crom.Controls.Docking.FormsDocker.SetAutoHide(DockableFormInfo info, Boolean autoHide)
at Crom.Controls.Docking.DockContainer.SetAutoHide(DockableFormInfo info, Boolean autoHide)
at Crom.Controls.Docking.DockStateSerializer.Load(Boolean clear, FormFactoryHandler formsFactory)
at Crom.Controls.Test.DockTest.OnFileLoadClick(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
 
************** Loaded Assemblies **************
...
QuestionHow can I refresh the form Text ?? PinmemberDeusiro30-Apr-10 10:40 
How can I refresh the form Text ?? OMG | :OMG:
 
When I change the form text, it is updated only after the windows is resized. I´ve tried a lot of things:
 
   
     void Form_TextChanged(object sender, EventArgs e)
        {
            //this.dockContainer.Invalidate();
            //this.dockContainer.Update();
            //this.dockContainer.TitleBarTextColor = this.dockContainer.TitleBarTextColor;
            //mainImageFormInfo.ShowCloseButton =  mainImageFormInfo.ShowCloseButton;
            //dockContainer.Refresh();
            dockContainer.Undock(mainImageFormInfo, new Rectangle());
            dockContainer.DockForm(mainImageFormInfo, DockStyle.Fill, zDockMode.None);
        }
 
Only using the Undock and after the DockForm the Text was refreshed. OMG | :OMG:
Pedro

QuestionRe: How can I refresh the form Text ?? Pinmemberlady-198714-Oct-11 12:58 
AnswerRe: How can I refresh the form Text ?? [modified] Pinmemberlady-198715-Oct-11 12:59 
QuestionHow to Change the Caption of a DockContainer Pinmembercloidnerux23-Apr-10 4:43 
I want to coustomize the Caption of one docked Form, with extra Buttons and Functionallity.
How do I achive that?
And a second Question: Is their any Possibility to give a docked form a static height?
AnswerRe: How to Change the Caption of a DockContainer PinmemberT3KN0GH0572-Feb-13 16:18 
GeneralSmall issue on ShowCloseButton & ShowContextMenuButton [modified] Pinmembermaxtrento19-Feb-10 8:29 
I notice that if i only insert one form in the DockContainer, the flags ShowContextMenubutton e ShowCloseButton appears to not work properly (it seems to has no effect), but if i add another one form to the DockContainer it works well.
I Downloaded the surces and i notice that the event Formsdocker.OnFormSelectedChanged is raised before to call a line like this:
info.ShowContextMenuButton = false;
info.ShowCloseButton = false;
_docker.DockForm(info, DockStyle.Right, zDockMode.Outer);
 
Hope to be helpful.
Regards Max
 
P.S. in the function FormDecoration.ApplyTopFormMargins maybe the line _titleRenderer.Icon = selectedForm.Icon; have to be under an if like this:
if (selectedForm.ShowIcon)
_titleRenderer.Icon = selectedForm.Icon
modified on Friday, February 19, 2010 3:40 PM

GeneralCheck if a pannel is visible Pinmemberfirefoxrabbit8-Feb-10 10:55 
Is thre a way, without making a separate variable, to chech if a pane is hide (removed) or visivble?
 
Best regarda, and compliments for good work.
GeneralForm size PinmemberBarzille2-Feb-10 2:38 
Hi @all,
I wonder how I can set the size of a docked form.
All I do is adding a DockableFormInfo (a) to the dockContainer, adding a second one to the right (b).
Now my last form (c) shall appear at the bottom of the dockable form to the right.
Setting the size of the form (b or c) has no effect. My form (b) is stuck at a very small height.
 
________________________
|aaaaaaaaaaaaa|bbbbbb|
|aaaaaaaaaaaaa|ccccccc|
|aaaaaaaaaaaaa|ccccccc|
|aaaaaaaaaaaaa|ccccccc|
|aaaaaaaaaaaaa|ccccccc|
-------------------
 

_formCenter = new Form();
_formRight = new Form();
_formRightBottom = new Form();
 
DockableFormInfo docking1 = dockContainer1.Add(_formCenter, zAllowedDock.All, Guid.NewGuid());
DockableFormInfo docking2 = dockContainer1.Add(_formRight, zAllowedDock.All, Guid.NewGuid());
DockableFormInfo docking2 = dockContainer1.Add(_formRightBottom, zAllowedDock.All, Guid.NewGuid());
            
dockContainer1.DockForm(docking1, DockStyle.Fill, zDockMode.Outer);
dockContainer1.DockForm(docking2, DockStyle.Right, zDockMode.Outer);
dockContainer1.DockForm(docking3, docking2, DockStyle.Bottom, zDockMode.Outer);
 
Any ideas?
GeneralRe: Form size Pinmembermaxtrento19-Feb-10 8:32 
GeneralHELP Please PinmemberMember 467350427-Jan-10 4:24 
Hello
I'm A beginner and need help. Sniff | :^)
How can dock the Form? I do not understand these instructions.
Is there a form which can be inherited?
Thanks bye
Permalink | Advertise | Privacy | Mobile
Web02 | 2.6.130617.1 | Last Updated 2 Oct 2009
Article Copyright 2009 by Cristinel Mazarine
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid