Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - PropertyGridItemEnum Selection...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

PropertyGridItemEnum Selection...

 Post Reply Post Reply
Author
Message
cooltoki View Drop Down
Newbie
Newbie
Avatar

Joined: 18 October 2012
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote cooltoki Quote  Post ReplyReply Direct Link To This Post Topic: PropertyGridItemEnum Selection...
    Posted: 18 October 2012 at 4:40am
Hello.
 
 
How can I unselect  on CXTPPropertyGridItemEnum ?
 
for example.
 
 
  CXTPPropertyGrid      m_wndGrid;
 
  CXTPPropertyGridItem* pBase = m_wndGrid.AddCategory( ID_PROP_BASE );
  CXTPPropertyGridItem* pItem;
  pItem = pBase->AddChildItem( new CXTPPropertyGridItemEnum("Test") );
      pItem->GetConstraints()->AddConstraint( L"Test 01", 0 );
      pItem->GetConstraints()->AddConstraint( L"Test 02", 1 );
  ............
 
  In above code,  "Test"  grid item is selected  "Test 01" (by default value 0(zero)).
 
 
 
  But, in some cases, I want to NOT SELECT "Test" grid item.
 
  pItem->GetConstraints()->SetCurrent( -1 );
 
  It does not work. Cry
  previous selection is still.
 
  How should I do ????
 
 
 
Back to Top
cooltoki View Drop Down
Newbie
Newbie
Avatar

Joined: 18 October 2012
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote cooltoki Quote  Post ReplyReply Direct Link To This Post Posted: 18 October 2012 at 11:10pm
Ah... CXTPPropertyGridItemEnum  unselection is successed.

    CXTPPropertyGridItemEnum.SetEnum( -1 );


But, I want to same things as Enum to CXTPPropertyGridItemNumber.

I override CXTPPropertyGridItemNumber and use SetEditText( L"" ).
It works when that item is selected. but still displayed with "0" values if not selected.

How should i do ???
Back to Top
cooltoki View Drop Down
Newbie
Newbie
Avatar

Joined: 18 October 2012
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote cooltoki Quote  Post ReplyReply Direct Link To This Post Posted: 24 October 2012 at 8:52pm
Ah... It is solved by calling SetValue( L"" ) of CXTPPropertyGridItem class.
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.156 seconds.