Property Grid as Dockable Pane? |
Post Reply |
Author | |
eric_hill
Newbie Joined: 13 February 2006 Status: Offline Points: 10 |
Post Options
Thanks(0)
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? |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
eric_hill
Newbie Joined: 13 February 2006 Status: Offline Points: 10 |
Post Options
Thanks(0)
|
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. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |