private void OnMouseMove(object sender, MouseEventArgs e)
 {
     // mouse button down? tab was clicked?
     if (e.Button == MouseButtons.Left && _predraggedTab != null)
     {
         _ctrlTab.DoDragDrop(_predraggedTab, DragDropEffects.Move);
     }
 }
Exemple #2
0
 private static void TabControl_DragDrop(object sender, MouseEventArgs e)
 {
     //Just do when the left-mouse is clicked
     if (e.Button != MouseButtons.Left || TabControl.TabPages.Count == 0)
     {
         return;
     }
     tabControl.DoDragDrop(tabControl.SelectedTab, DragDropEffects.All);
 }
Exemple #3
0
        private void RedactorsTabControl_MouseMove(object sender, MouseEventArgs e)
        {
            TabControl tc = sender as TabControl;

            if ((e.Button != MouseButtons.Left) || (tc.Tag == null))
            {
                return;
            }
            tc.DoDragDrop(tc.Tag as TabPage, DragDropEffects.All);
        }
        /// <summary>
        /// Allow DoDragDrop on Mouse Move
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private static void tabControl_MouseMove(object sender, MouseEventArgs e)
        {
            // this is necessary for the mousedown event
            tabControl.Tag = tabControl.SelectedTab;

            //if user click left mouse
            if ((e.Button != MouseButtons.Left))
            {
                return;
            }

            // start drag and drop
            tabControl.DoDragDrop(tabControl.SelectedTab, DragDropEffects.All);
        }
        private void FileTabControl_MouseMove(object sender, MouseEventArgs e)
        {
            // mouse button down? tab was clicked?
            TabControl tc = (TabControl)sender;

            if ((e.Button != MouseButtons.Left) || (tc.Tag == null))
            {
                return;
            }
            EditorTab clickedTab    = (EditorTab)tc.Tag;
            int       clicked_index = tc.TabPages.IndexOf(clickedTab);

            // start drag n drop
            tc.DoDragDrop(clickedTab, DragDropEffects.All);
        }
Exemple #6
0
        private void BrowserTabs_MouseMove(object sender, MouseEventArgs e)
        {
            // mouse button down? tab was clicked?
            TabControl tc = (TabControl)sender;

            if ((e.Button != MouseButtons.Left) || (tc.Tag == null))
            {
                return;
            }
            TabPage clickedTab    = (TabPage)tc.Tag;
            int     clicked_index = tc.TabPages.IndexOf(clickedTab);

            // start drag n drop
            tc.DoDragDrop(clickedTab, DragDropEffects.All);

            //Syncronise url to addressbar
            SyncAddressBarToUrl();
        }
Exemple #7
0
        private void TabControl_MouseMove(object sender, MouseEventArgs e)
        {
            TabControl tabControl = (sender as TabControl);

            if (e.Button != MouseButtons.Left)
            {
                return;
            }

            Rectangle r = new Rectangle(DragStartPosition, Size.Empty);

            r.Inflate(SystemInformation.DragSize);

            TabPage tp = HoverTab(tabControl);

            if (tp != null)
            {
                if (!r.Contains(e.X, e.Y))
                {
                    tabControl.DoDragDrop(tp, DragDropEffects.All);
                }
            }
            DragStartPosition = Point.Empty;
        }