Print Page | Close Window

Context menu in property grid

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=11533
Printed Date: 22 June 2025 at 2:50pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Context menu in property grid
Posted By: dennisV
Subject: Context menu in property grid
Date Posted: 22 July 2008 at 6:55am
Hi!

Is it possible to have a context (RMB) menu in a property grid item?

Thanks!

   Dennis


-------------
// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)



Replies:
Posted By: mgampi
Date Posted: 22 July 2008 at 7:39am
Hi;

Just overwrite the CXTPPropertyGridItem::OnRButtonDown(UINT nFlags, CPoint point);
It's a virtual function and can be used to show a popup menu.


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022


Posted By: dennisV
Date Posted: 22 July 2008 at 8:40am
Originally posted by mgampi mgampi wrote:

Hi;

Just overwrite the CXTPPropertyGridItem::OnRButtonDown(UINT nFlags, CPoint point);
It's a virtual function and can be used to show a popup menu.

Thank you! Will do that.


-------------
// W7 64 Ultimate SP1
// VS 2008
// CodeJock 16.2.3 (MFC)


Posted By: zanget
Date Posted: 21 April 2009 at 8:33am
hi, https://forum.codejock.com/member_profile.asp?PF=760&FID=112 - dennisV   and  https://forum.codejock.com/member_profile.asp?PF=109&FID=112 - mgampi
im a new for codejock,i had a problem on overwrite  this functions:
this is my code:
 
class CCustomItemzPWDChilds : public CXTPPropertyGridItem
{
  public:
 CCustomItemzPWDChilds(CString strCaption,CString * editText,int Maxlen) : CXTPPropertyGridItem(strCaption), m_wndEdit(editText,Maxlen)
 {
  if(editText)
  {
   CString tmp = *editText;
   BindToString(editText);
   *editText = tmp;
  }
 }

  protected:
 virtual CXTPPropertyGridInplaceEdit & GetInplaceEdit()
 {
  return m_wndEdit;
 }
 virtual void OnRButtonDown(UINT, CPoint) {}  /*NO right mouse key menu*/
  private:
 CInplacePwd m_wndEdit;
};

but the edit box also had a menu,i just need to disable the menu....
i dont know why and how to do so.
wait for you replay...



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