Print Page | Close Window

Is there a way to sort a list of CXTPPropertyGridI

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=6601
Printed Date: 22 November 2024 at 5:21pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Is there a way to sort a list of CXTPPropertyGridI
Posted By: byteman
Subject: Is there a way to sort a list of CXTPPropertyGridI
Date 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?




Replies:
Posted By: Oleg
Date Posted: 09 March 2007 at 2:44am
hi,
 
pOptionList->GetChilds()->Sort();
 


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


Posted By: byteman
Date 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?


Posted By: Oleg
Date 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


Posted By: byteman
Date Posted: 12 March 2007 at 11:12am
Will do.  Thanks Oleg.



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