Print Page | Close Window

ReportControl Context menu

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2218
Printed Date: 21 October 2025 at 1:04pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ReportControl Context menu
Posted By: larryp
Subject: ReportControl Context menu
Date Posted: 12 May 2005 at 4:25pm
How do I display a context menu when right-clicking on the area below the last item in the last row?

I can display two of the three context menus that I need.  I can display the one when right-clicking the group heading and the one when right-clicking an item, but not when right-clicking below the last item.  I want to do something similar to what Outlook 2003 does.

Any help would be greatly appreciated.

Larry



Replies:
Posted By: sserge
Date Posted: 16 May 2005 at 1:33pm
Hello Larry,

To have a possibility to catch this event you can patch the code of the method CXTPReportControl::OnContextMenu like following:

       // call context menu handler for report area if clicked inside
       if (m_rcReportArea.PtInRect(ptClient))
       {
                // rows processing
                CXTPReportRow* pRow = HitTest(ptClient);
                if (pRow)
                {
                       SetFocusedRow(pRow, !pRow->IsGroupRow() || pRow->IsSelected());
                       pRow->OnContextMenu(ptClient);
                }
                else
                {
                       // send process notification to the user and wait for the reaction
                       SendMessageToParent(NULL, NULL, NULL, NM_RCLICK, &ptClient);
                }

       }

And just catch the notification when pointers to row and record item are NULL's.

This patch will also be included in the next version of the library.

--
WBR,
Serge


Posted By: larryp
Date Posted: 17 May 2005 at 8:12am
Thanks for the reply. 

I am glad it will be included in the next version.

Larry



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net