Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Disable context menue
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Disable context menue

 Post Reply Post Reply
Author
Message
mlatona View Drop Down
Senior Member
Senior Member


Joined: 19 April 2005
Location: Germany
Status: Offline
Points: 124
Post Options Post Options   Thanks (0) Thanks(0)   Quote mlatona Quote  Post ReplyReply Direct Link To This Post Topic: Disable context menue
    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?
Back to Top
pcmaker View Drop Down
Groupie
Groupie
Avatar

Joined: 05 May 2005
Location: Venezuela
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote pcmaker Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
mlatona View Drop Down
Senior Member
Senior Member


Joined: 19 April 2005
Location: Germany
Status: Offline
Points: 124
Post Options Post Options   Thanks (0) Thanks(0)   Quote mlatona Quote  Post ReplyReply Direct Link To This Post 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'.

Back to Top
pcmaker View Drop Down
Groupie
Groupie
Avatar

Joined: 05 May 2005
Location: Venezuela
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote pcmaker Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

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.

Back to Top
mlatona View Drop Down
Senior Member
Senior Member


Joined: 19 April 2005
Location: Germany
Status: Offline
Points: 124
Post Options Post Options   Thanks (0) Thanks(0)   Quote mlatona Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 02 June 2007 at 7:56am
Ok, thanks. Added property ReportControl.InplaceEditHwnd

--
WBR,
Serge
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.180 seconds.