Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - property grid is not displayed in my view
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

property grid is not displayed in my view

 Post Reply Post Reply
Author
Message
mhwong View Drop Down
Newbie
Newbie


Joined: 18 June 2008
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote mhwong Quote  Post ReplyReply Direct Link To This Post Topic: property grid is not displayed in my view
    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
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: 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
Back to Top
mhwong View Drop Down
Newbie
Newbie


Joined: 18 June 2008
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote mhwong Quote  Post ReplyReply Direct Link To This Post 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);

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: 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
Back to Top
mhwong View Drop Down
Newbie
Newbie


Joined: 18 June 2008
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote mhwong Quote  Post ReplyReply Direct Link To This Post 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.

uploads/20080702_151757_TabCtrl.zip

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: 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
Back to Top
mhwong View Drop Down
Newbie
Newbie


Joined: 18 June 2008
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote mhwong Quote  Post ReplyReply Direct Link To This Post 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!!

uploads/20080706_172801_TabCtrl2.zip

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: 07 July 2008 at 4:02am
Bug in your code:
 
replace
         char* strCap;
to
        char strCap[10];
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.125 seconds.