Print Page | Close Window

Property Grid as Dockable Pane?

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=5511
Printed Date: 22 June 2024 at 6:27am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Property Grid as Dockable Pane?
Posted By: eric_hill
Subject: Property Grid as Dockable Pane?
Date Posted: 13 November 2006 at 4:43pm
What is the right way to create a property grid as a dockable pane?  I tried modifying the MFC ToolkitPro template such that the declaration of the pane was:

CXTPOfficeBorder<CXTPPropertyGrid> m_wndProperties;


The window did indeed show up as a property grid (I could see the help section below), but no matter what I do in the OnCreate routine, I can't get any items added to the grid.  Here's what I'm trying to do:

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) {
    // ...
    CXTPPropertyGridItem* pCategory = m_wndProperties.AddCategory(_T("Example Category"));
    CXTPPropertyGridItem* pItem = pCategory->AddChildItem(new CXTPPropertyGridItemNumber("Example Number"));
  // ...
}


This code compiles and runs just fine, but the property grid stays blank instead of showing the added item.

Any hints?



Replies:
Posted By: Oleg
Date Posted: 14 November 2006 at 12:37am
You don't need CXTPOfficeBorder class. Just CXTPPropertyGrid m_wndProperties.
 
 
See GUI_Whidbey sample it has Property Grid as pane.


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


Posted By: eric_hill
Date Posted: 14 November 2006 at 9:24am
The GUI_Whidbey led me to the correct answer.  After a grid.Create(...) call, you have to do grid.SetOwner(...), otherwise the grid will never paint.

Thanks.



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