Print Page | Close Window

property grid is not displayed in my view

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


Topic: property grid is not displayed in my view
Posted By: mhwong
Subject: property grid is not displayed in my view
Date Posted: 18 June 2008 at 2:51pm
i am using CXTTabCtrl to have a tabbed dialog and i am adding CFormViews as my tabs.

in my code i have a view called CMicrophoneView where i am trying to use CXTPPropertyGrid however the property grid does not get displayed, i used the same approach as the property grid sample application that came with codejock.

if i move the mouse over the area where i expected the property grid control to be, i can see arrows for manipulating the control.  so i think it has to do with how the property grid is being painted, but i dont know how to solve this problem.

source code provided below, any help would be greatly appreciated, thanks.

uploads/20080618_144125_code.zip - uploads/20080618_144125_code.zip



Replies:
Posted By: Oleg
Date Posted: 19 June 2008 at 1:49am
Hi,
 
Just bring it to front:
 
 m_grid.SetWindowPos(&CWnd::wndTop, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);


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


Posted By: mhwong
Date Posted: 01 July 2008 at 6:36pm
thanks that makes it display, however when i try to put in a combo box when i click on the combo box the drop down list does not display

i do the following

CXTPPropertyGridItem* pItem = pGrid->AddChildItem(new  CXTPPropertyGridItem(_T("ComboBox"), 0);

pItem->GetConstraints()->AddConstraint(_T("hello world"));
pItem->SetFlags(xtpGridItemHasComboButton|xtpGridItemHasEdit);
pItem->SetConstraintEdit(TRUE);



Posted By: Oleg
Date Posted: 02 July 2008 at 1:14am
Hi,
I can't reproduce it with attached sample. I added same code - works fine.


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


Posted By: mhwong
Date Posted: 02 July 2008 at 3:18pm

Can you please try with this sample? For the second tab, second property grid, for charger current, I can go through the combo box values by using arrow key, but it does not display the combo box.

 

Thanks.

https://forum.codejock.com/uploads/20080702_151757_TabCtrl.zip - uploads/20080702_151757_TabCtrl.zip



Posted By: Oleg
Date Posted: 02 July 2008 at 3:43pm

Hi,

OnGridNotify have to return FALSE by default....
 
 
also to reduce flickers add
 
 GetDlgItem(IDC_FG_PARAMS_GRID)->ShowWindow(SW_HIDE);
 GetDlgItem(IDC_CHARGE_CURRENT_GRID)->ShowWindow(SW_HIDE);
before you create grids.


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


Posted By: mhwong
Date Posted: 06 July 2008 at 5:28pm

I have a report control in tab1, and a property grid in tab2. If something changes in one of the columns in the report control, I need to display the same value in one of the fields in the property grid on tab 2. UpdateData() will not work. What is the best way to do this? Even if I have a document associated with the view, I can’t get it to work with UpdateAllViews(), right?

In this code, if I change the value of Capacity in mAh, then in tab2, the Max Capacity does get changed, but I also get a crash on the second attempt!!

https://forum.codejock.com/uploads/20080706_172801_TabCtrl2.zip - uploads/20080706_172801_TabCtrl2.zip



Posted By: Oleg
Date Posted: 07 July 2008 at 4:02am
Bug in your code:
 
replace
         char* strCap;
to
        char strCap[10];


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



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