tabcontrol-extra icon indicating copy to clipboard operation
tabcontrol-extra copied to clipboard

Drag'n'drop was broken

Open wmjordan opened this issue 3 years ago • 3 comments

The point passed to GetActiveTabIndex should be the client coordinate. Thus the corresponding code in TabControlExtra.OnDragOver should be:

var dragPoint = new Point(drgevent.X, drgevent.Y);
var tabPoint = this.PointToScreen(Point.Empty);
dragPoint.Offset(-tabPoint.X, -tabPoint.Y);
if (this.GetActiveTab(dragPoint) == dragTab) {
    return;
}

int insertPoint = this.GetActiveIndex(dragPoint);
if (insertPoint < 0) return;

wmjordan avatar Mar 08 '21 01:03 wmjordan