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

When ImageListView lost focus,the value of ShiftKey and ControlKey sh… #231

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ImageListView/ImageListView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2000,6 +2000,7 @@ protected override void OnGotFocus(EventArgs e)
/// <param name="e">An <see cref="T:System.EventArgs"/> that contains the event data.</param>
protected override void OnLostFocus(EventArgs e)
{
navigationManager.LostFocus(e);
base.OnLostFocus(e);
Refresh();
}
Expand Down
9 changes: 9 additions & 0 deletions ImageListView/ImageListViewNavigationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,15 @@ public void KeyUp(KeyEventArgs e)
ShiftKey = (e.Modifiers & Keys.Shift) == Keys.Shift;
ControlKey = (e.Modifiers & Keys.Control) == Keys.Control;
}

/// <summary>
/// Handles the LostFocus event.
/// </summary>
public void LostFocus(EventArgs e)
{
ShiftKey = false;
ControlKey = false;
}
#endregion

#region Drag and Drop Event Handlers
Expand Down