Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to toggle form in and out of DockPane control #515

Open
richardosp opened this issue Sep 28, 2017 · 2 comments
Open

How to toggle form in and out of DockPane control #515

richardosp opened this issue Sep 28, 2017 · 2 comments

Comments

@richardosp
Copy link

richardosp commented Sep 28, 2017

I wish to be able to toggle the behaviour of a form by making it dockable or non-dockable.
If I start the form with a simple Show() it obviously won't dock until I call Show( dockPanel) which works fine and the form gets docked. After floating it I want to remove it from DockPanel control so that it becomes non-dockable. I have tried DockHandler.DockPanel = null but this causes the form to disappear as does trying a Show() again. Any ideas?
Thanks


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@lextm
Copy link
Member

lextm commented Sep 28, 2017

You should provide some code snippets/screen shots or similar to make a reproducible description of the issue.

@richardosp
Copy link
Author

// Scorecard is : DockContent

        Scorecard sc = new Scorecard(this, null);
        sc.Show(); // non-dockable
        sc.Show(dockPanel); // dockable and docked 
        sc.Show(); // still docked
        // release from docking but form disappears completely
        sc.DockHandler.DockPanel = null;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants