Home Forums WinForms controls Other WinForms controls Problems docking to bottom of mdi form?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #18188 |

    Hi there,

    I have an MDI parent (an mdi form) and i am trying to add a toolwindow, autohiden at the bottom of the screen… but it keeps putting it to the left…

    I hoppe someone can help, here is my code, i thought it was pretty straight forward but i am doing thing wrong..

    // Suspend the layout until ResumeLayout is called.
    m_manager.SuspendLayout();

    m_manager.AllowAutoHide = true;
    m_manager.AllowFloating = false;

    m_manager.ToolWindows.Add( new TestForm( “testViewer”,”Test FORM”,”” ) );
    m_manager.ToolWindows[ “testViewer” ].DockTo( DockTargetHost.DockHost, DockPosition.Bottom );

    m_manager.ToolWindows[ “testViewer” ].State = ToolWindowState.AutoHide;

    // Resume the layout
    m_manager.ResumeLayout();

    I don’t understand why it is Docking on the left….. my property mdi parent is to true in design mode

    Please help, thank you very much in advance..

    Ian

    Imported from legacy forums. Posted by igregson (had 3252 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi..

    just noticed that when in autohide mode which is what i want.. it docks to the left which isn’t what i intended … but if i press the pin button next the the x… then it actually physically DOCKS to the bottom.. but when in autohide mode.. i have a pic of tab but its at the left of the mdi form…

    any ideas… i am trying to convert my app to use docking of xceed due to the fact it was using magic docking (the old free version) that just doesn’t support things that we need to do

    Thanks

    ian

    Imported from legacy forums. Posted by igregson (had 214 views)

    User (Old forums)
    Member
    Post count: 23064

    The AutoHide code line must be done outside of the SuspendLayout block, because of a bug in the component which make the ToolWindow always dock to left when this is done within the SuspendLayout block.

    m_manager.SuspendLayout();

    …..

    m_manager.ResumeLayout();

    m_manager.ToolWindows[ “testViewer” ].State = ToolWindowState.AutoHide;

    Imported from legacy forums. Posted by André (had 216 views)

    User (Old forums)
    Member
    Post count: 23064

    Thanks.. yes this pretty much sorted my problem out, but when adding quite a few controls to Bottom for example… the last one added is always put to the left, I have sent you my code but thought i would put this comment here to help others too

    Look forward to your reply

    Ian

    Imported from legacy forums. Posted by ianinspain (had 4261 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.