Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Is there a way to sort a list of CXTPPropertyGridI
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Is there a way to sort a list of CXTPPropertyGridI

 Post Reply Post Reply
Author
Message
byteman View Drop Down
Groupie
Groupie
Avatar

Joined: 08 March 2007
Location: United States
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote byteman Quote  Post ReplyReply Direct Link To This Post Topic: Is there a way to sort a list of CXTPPropertyGridI
    Posted: 08 March 2007 at 6:34pm
Is there a way to sort a list of CXTPPropertyGridItem's?  I can write my own but it seems like it would be part of the PropertyGrid class.  The sample code shows basically what I want to do.
 
 
CXTPPropertyGridItem* pOptionList= m_pWndPropertyGrid->AddCategory(_T("a list of options"));

int i = 0;

while (i<10)

{

CXTPPropertyGridItemBool* pItem = new CXTPPropertyGridItemBool(_T"some desc", TRUE);

pOptionList->AddChildItem(pItem);

i++;

}

"pOptionList->Sort" <- Any suggestions?  Is there already a funtion to do this?

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: 09 March 2007 at 2:44am
hi,
 
pOptionList->GetChilds()->Sort();
 
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
byteman View Drop Down
Groupie
Groupie
Avatar

Joined: 08 March 2007
Location: United States
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote byteman Quote  Post ReplyReply Direct Link To This Post Posted: 09 March 2007 at 12:40pm
Sort() is a protected function of CXTPPropertyGridItems so i get an error trying to compile the statement
pOptionList->GetChilds()->Sort(); 
 
I could make it public?  But I assume there was a reason it was protected and would rather not mess with the library if I don't have to.  Is another way to sort?
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 March 2007 at 2:08am
Hi,
Please move it to public and rebuild library. We will do it also for 11.0 release.
 
Thanks.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
byteman View Drop Down
Groupie
Groupie
Avatar

Joined: 08 March 2007
Location: United States
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote byteman Quote  Post ReplyReply Direct Link To This Post Posted: 12 March 2007 at 11:12am
Will do.  Thanks Oleg.
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.109 seconds.