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.
Unfortunately, activation email could not send to your email. Please try again.

Select TabPage while Drag Drop

Thread ID:

Created:

Updated:

Platform:

Replies:

12098 Mar 22,2004 08:40 AM Mar 23,2004 07:23 AM Windows Forms 3
loading
Tags: Tools
Administrator [Syncfusion]
Asked On March 22, 2004 08:40 AM

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

Administrator [Syncfusion]
Replied On March 22, 2004 04:18 PM

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.

Administrator [Syncfusion]
Replied On March 23, 2004 05:47 AM

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

Administrator [Syncfusion]
Replied On March 23, 2004 07:23 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;