We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Select TabPage while Drag Drop

Hi, I have a form with multible TabPages(Syncfusion TabControl), one of it has a grid that is the target for a Drag Drop operation. As example, this is the second tab. Now, the first tab is the selected tab on the form. What I have to do to activate the second tab while I''m draggin with the mouse over it''s rectangle in the tabcontrol to activate it? How can I figure out that the mouse pointer is over the rectangle of the second tab and how can I figure out that a Drag Drop operation is active? Thnaks for your help, Thomas

3 Replies

AD Administrator Syncfusion Team March 22, 2004 09:18 PM UTC

Hi Thomas, I have requested the development team for their inputs on this issue, and will update you with more information shortly. We appreciate your patience and cooperation. Regards, Guru Patwal Syncfusion, Inc.


AD Administrator Syncfusion Team March 23, 2004 10:47 AM UTC

Hi Guru, I found a way: private void tabControlAdv1_DragOver(object sender, System.Windows.Forms.DragEventArgs e) { Point pt = new Point(e.X, e.Y); //We need client coordinates. pt = this.tabControlAdv1.PointToClient(pt); TabPageAdv tab = this.GetTabPageByTab( pt ); if( tab != null ) { this.tabControlAdv1.SelectedTab = tab; } } private TabPageAdv GetTabPageByTab(Point pt) { TabPageAdv tp = null; for(int i = 0; i < this.tabControlAdv1.TabPages.Count; i++) { if(this.tabControlAdv1.GetTabRect(i).Contains(pt)) { tp = this.tabControlAdv1.TabPages[i]; break; } } return tp; } Regards, Thomas


AD Administrator Syncfusion Team March 23, 2004 12:23 PM UTC

Hi Thomas, Thanks for sharing this information with us. We appreciate your continued interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Up arrow icon