Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - CXTPPropertyGridItemEnum drop down not appearing
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPPropertyGridItemEnum drop down not appearing

 Post Reply Post Reply
Author
Message
DLewanda View Drop Down
Newbie
Newbie


Joined: 10 September 2008
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote DLewanda Quote  Post ReplyReply Direct Link To This Post Topic: CXTPPropertyGridItemEnum drop down not appearing
    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!

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 12 September 2008 at 1:08am
guess you need
 
pOperationItem->GetConstraints()->AddConstraint( OPERATION_MODES[ i ] , i );
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
DLewanda View Drop Down
Newbie
Newbie


Joined: 10 September 2008
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote DLewanda Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
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.172 seconds.