Print Page | Close Window

CXTPPropertyGridItemEnum drop down not appearing

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=12139
Printed Date: 01 July 2024 at 7:14pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPPropertyGridItemEnum drop down not appearing
Posted By: DLewanda
Subject: CXTPPropertyGridItemEnum drop down not appearing
Date Posted: 11 September 2008 at 10:45am
I modified the standard CXTPPropertyGridItemEnum example to load constraints from an array of CStrings.  While I can see all the constraints if I use the arrow keys, clicking on the drop-down button doesn't show the constraint list as expected.  Here is my code sample

   CXTPPropertyGridItem* pOperationItem = pPropertyCategoryItem->AddChildItem(
      new CXTPPropertyGridItemEnum( _T("Operation:"), selectedOperation, &selectedOperation ) );

   for( int i = 0; i < OPERATION_MODE_COUNT; i++ )
   {
      pOperationItem->GetConstraints()->AddConstraint( OPERATION_MODES , i );
   }

Notes:
pPropertyCategoryItem is a CXTPPropertyGridItem* (actually a CXTPPropertyGridItemCategory)
OPERATION_MODES is a CString[]
OPERATION_MODE_COUNT = 5

Please let me know what I am missing.

Thanks in advance!




Replies:
Posted By: Oleg
Date Posted: 12 September 2008 at 1:08am
guess you need
 
pOperationItem->GetConstraints()->AddConstraint( OPERATION_MODES[ i ] , i );


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: DLewanda
Date Posted: 12 September 2008 at 8:13am
Sorry, it looks like the posting mechanism ate my [i].  I am doing what you suggested.  I can see the items individually if I use the arrow keys, but I can't see the drop-down menu.  Any other ideas?


Posted By: Oleg
Date Posted: 15 September 2008 at 6:00am
Hi,
 
Have to work automatically. Check maybe you call SetFlags later..
 
try to modify our sample to getsame result abnd attach change file here.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



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