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

MonoGame Control on a Panel resets his scrollbars on MouseOver #10

Closed
BlizzCrafter opened this issue Aug 28, 2018 · 0 comments
Closed
Labels
WindowsForms bug This is a bug which is not directly related to the MonoGame.Forms library.

Comments

@BlizzCrafter
Copy link
Owner

Originally reported here:

http://community.monogame.net/t/monogame-forms-create-your-editor-environment/9954/138

Description:

I'm having an issue where whenever I move my mouse over a DrawWindow in my project, the scroll bar for the form containing it automatically resets.

Solution:

This is a WindowsForms bug and not realted to the MonoGame.Forms library.
You can fix it by creating your own Panel class and place your MonoGame control onto this Panel. See the following example.

public class PanelNoScrollOnFocus : Panel
{
    protected override System.Drawing.Point ScrollToControl(Control activeControl)
    {
        return DisplayRectangle.Location;
    }
}
@BlizzCrafter BlizzCrafter added the WindowsForms bug This is a bug which is not directly related to the MonoGame.Forms library. label Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WindowsForms bug This is a bug which is not directly related to the MonoGame.Forms library.
Projects
None yet
Development

No branches or pull requests

1 participant