Disable context menue |
Post Reply |
Author | |
mlatona
Senior Member Joined: 19 April 2005 Location: Germany Status: Offline Points: 124 |
Post Options
Thanks(0)
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?
|
|
pcmaker
Groupie Joined: 05 May 2005 Location: Venezuela Status: Offline Points: 23 |
Post Options
Thanks(0)
|
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! |
|
mlatona
Senior Member Joined: 19 April 2005 Location: Germany Status: Offline Points: 124 |
Post Options
Thanks(0)
|
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'. |
|
pcmaker
Groupie Joined: 05 May 2005 Location: Venezuela Status: Offline Points: 23 |
Post Options
Thanks(0)
|
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. |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
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 |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
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 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. |
|
mlatona
Senior Member Joined: 19 April 2005 Location: Germany Status: Offline Points: 124 |
Post Options
Thanks(0)
|
Thank you for your example. It`s great.
To Codejock. Can you add property 'EditHwnd', who give us the handle from the edit textbox?
|
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
Ok, thanks. Added property ReportControl.InplaceEditHwnd
-- WBR, Serge |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |