Print Page | Close Window

Disable context menue

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=7141
Printed Date: 05 February 2025 at 3:01pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Disable context menue
Posted By: mlatona
Subject: Disable context menue
Date Posted: 15 May 2007 at 12:53pm
Hi,
 
how can I disable the context menue? I will show my own context menue when the cell is in edit mode.
 
Is this possible?



Replies:
Posted By: pcmaker
Date Posted: 15 May 2007 at 2:36pm
TRY VIEW THE CELL STATUS(TRUE OR FALSE) AND WITH A IF CALL YOUR MENU OR NOT!

EXAMPLE
Private Sub wnd_RowRClick(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem)
On Error GoTo ControlError
If Item.Editable = True Then  
   Call menu_Rclick
End If
Exit Sub
End Sub

GOOD LUCK!


Posted By: mlatona
Date Posted: 16 May 2007 at 3:35am

No, it don`t works. When the cell is in edit mode (cursor is in cell) the reportcontrol not raised the events 'MouseDown' or 'RowRClick'.



Posted By: pcmaker
Date Posted: 16 May 2007 at 9:10am
YES, IS TRUE!
WELL, OR IS A BUG OR THE CONTROL WORK IN THIS WAY!!!

REPORT ANYWAY LIKE A BUG AND WAIT A RESPONSE FOR ADVANCED USER!

EXCUSEME FOR MY POOR ENGLISH.


Posted By: sserge
Date Posted: 16 May 2007 at 2:05pm
When you edit a text cell -- a regular Edit box is active and right click on it shows its own menu. Another edit controls (like combo box) show another context menus. It can't be customized.

--
WBR,
Serge


Posted By: jpbro
Date Posted: 17 May 2007 at 10:06pm
Hi mlatona,

Just for fun, I poked around with the ReportControl (11.1) to see if I could disable the context menu. sserge's comments that the ReportControl uses a standard Edit box made me think that it should be possible to subclass it.

It was a bit tricky (and I made it trickier on myself by overcomplicating the subclassing code), and it relied on an ugly timer hack, but I did get a proof of concept to work. You can download the OCX, a test project and all the source code from here:

http://www.collidingscopes.com/reportsubclasser.zip - http://www.collidingscopes.com/reportsubclasser.zip

Of course you can modify it to suit your needs as much as you want. No warranties or guarantees are given with this code. Have fun.



Posted By: mlatona
Date Posted: 18 May 2007 at 4:10am
Thank you for your example. It`s great.
 
To Codejock. Can you add property 'EditHwnd', who give us the handle from the edit textbox?


Posted By: sserge
Date Posted: 02 June 2007 at 7:56am
Ok, thanks. Added property ReportControl.InplaceEditHwnd

--
WBR,
Serge



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