Ticket Q418869
Visible to All Users
Duplicate

Event after tab has been moved (AllowTabDragDrop)

Answers

created 9 years ago (modified 9 years ago)

There is a less elegant but more simple solution which doesn't require modifying the devexpress source code. If each tabsheet is filled by a panel aligned to client then the OnMouseUp and OnMouseDown events of the TcxPageControl will only fire when the mouse is moved up or down in the tab area of the pagecontrol.

Use these PageControl events and the X values to determine if the tabs were moved or not. You can then take action based on the result.

e.g.

on cxPageControl.onmousedown;
  BeforeX := x;

on cxPageControl.onmouseup;
  if abs(beforex-x) > 5 then
  // Tabs probably moved

    created 13 years ago (modified 13 years ago)

    Hello Erick,
    Thank you for your message. I am afraid that this functionality is not supported in the current version of ExpressPageControl. However, you can create an event handler to raise your inherited class of TcxPageControlProperties when the drag-and-drop operation of the tab is over. In this case, it is necessary to override the Init and Drop methods of the TcxTabControlDragAndDropObject. The TcxTabControlDragAndDropObject can provide us with information about the next and previous visible indexes of the dragged tab.
    Attached is a simple example that demonstrates this approach in action. I hope this helps you achieve the required functionality

      Show previous comments (6)
      DevExpress Support Team 9 years ago

        Hello Oleksandr,

        We have no immediate plans to implement this functionality. We will probably reconsider our position regarding this feature for future versions of our controls. Please add the Q278734: Event after Tab has been moved (AllowTabDragDrop) thread to Favorites to be notified when we implement the feature.

        CD CD
        Cerm Development 8 years ago

          We would be interested in this feature also. So if you would find the time this would be great !

          SC SC
          Stuart Clennett 8 years ago

            We need this feature too please.

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.