public void MouseDown(Point loc) { if (IsCaretInLocation(loc)) { IsMouseDown = true; diff = loc.Y - lastCaretPos; } else { var value = GetScrollValue(loc); window.SetScrollPositionY(value); } }
private void InitializeWindow() { if (window == null) { window = new AutocompleteWindow(editor); window.Visible = false; window.MouseDown += WindowMouseDown; editor.Controls.Add(window); } window.SetScrollPositionY(0); }