Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8403103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:15:21+00:00 2026-06-09T22:15:21+00:00

I have a popup menu which works as expected. The drag-and-drop functionality on the

  • 0

I have a popup menu which works as expected. The drag-and-drop functionality on the same object works as expected. Put them together, and…

The popup menu appears when I right-click. Wile the menu is stil there, a subsequent left-click off the popup menu but still on the object invokes the drag-and-drop functionality, as if the initial right-click were a left click which had been held until now and then released.

void __fastcall myGrid::eDragDrop(System::TObject *Sender, System::TObject *Source, int X, int Y)
{
  while((Sender != this) && (Sender != NULL))
  {
    TControl *control = dynamic_cast < TControl * > (Sender);
    if(control != NULL)
    {
      X += control->Left;
      Y += control->Top;
      Sender = control->Parent;
    }
    else
    {
      Sender = NULL;
    }
  } // while
  // Check for a drop onto the Chart

  if((Column != NULL)&&(Column->Visible)&& (Column->HeaderIndex>=0))
  {
    int Xt = X - FHeaderSB->Left + FHorzScroll->Position;
    int HeaderIndex = Column->HeaderIndex;
    if((Xt > FHeaderSections->Items[HeaderIndex]->Left) && (Xt < FHeaderSections->Items[HeaderIndex]- >Right))
    {
      Xt -= FHeaderSections->Items[HeaderIndex]->Left;
      GotDragDropTime = true;
      DragDropTime = Column->GetTimeFromPosition(Xt);
    } // if
  } // if Visible


  if(fDragDrop != NULL)
  {
    fDragDrop(Sender, Source, X, Y);
  }
}

What have I done wrong? How can I fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T22:15:23+00:00Added an answer on June 9, 2026 at 10:15 pm

    Found it! There was an oversight in a function called in OnMouseDown where the PendingDrag flag was set without checking which button was clicked.

    I hadn’t realised how much of the drag functionality was controlled in our code. It was not the fault of Borland C++ Builder 6 after all.

    Thank you for the insightful comments. They helped me find the bug.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a popup menu implemented , which shows up on click of a
I have a popup menu that has a few items in it. Option 1
I have an enhanced popup menu (TOPopupMenu) with customized items (TOMenuItem). In Delphi 2007
Say I have a bog-standard Win32 popup menu, and it's taller than the screen.
I have created an Activity that will behave like a popup menu is actually
In my app I currently have a popup menu implemented as a BorderContainer with
We have a row of header menu links where a couple of them need
I have a dialog application in which I want to have clickable menu items
here is my problem: I have a jList and a popup menu. When I
I have my div with a right click popup menu: // Attatch right click

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.